University of Calgary PRISM: University of Calgary's Digital Repository
Graduate Studies The Vault: Electronic Theses and Dissertations
2018-07-25 EEIA: The Extended Efficiency Improvement Advisor
Nygren, Nicholas
Nygren, N. (2018). EEIA: The Extended Efficiency Improvement Advisor (Unpublished master's thesis). University of Calgary, Calgary, AB. doi:10.11575/PRISM/32705 http://hdl.handle.net/1880/107524 master thesis
University of Calgary graduate students retain copyright ownership and moral rights for their thesis. You may use this material in any way that is permitted by the Copyright Act or through licensing that has been assigned to the document. For uses that are not allowable under copyright legislation or licensing, you are required to seek permission. Downloaded from PRISM: https://prism.ucalgary.ca UNIVERSITY OF CALGARY
EEIA: The Extended Efficiency Improvement Advisor
by
Nicholas Nygren
A THESIS
SUBMITTED TO THE FACULTY OF GRADUATE STUDIES
IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE
DEGREE OF MASTER OF SCIENCE
GRADUATE PROGRAM IN COMPUTER SCIENCE
CALGARY, ALBERTA
JULY, 2018
c Nicholas Nygren 2018
Abstract
In the past, the Efficiency Improvement Advisor (EIA) has been successfully applied to several dynamic problems. By learning recurring tasks, it was able to correct inefficient behavior in multi- agent systems. We present an extension to the advisor which allows certain known-ahead knowl- edge to be exploited. This extension unobtrusively guides autonomous agents to follow a plan, while retaining the dynamic abilities of those agents. Unlike other similar approaches which in- troduce planning functionality, this does not require always-on communications. The extended advisor’s planning abilities work in tandem with the original learning abilities to create additional efficiency gains. The abilities of the extended advisor (including the introduction of planning, the preservation of dynamism, and mixing certain knowledge with learned knowledge) are eval- uated in 2 different problem domains. First, the advisor is applied to the familiar arcade game:
Whack-a-mole. Then, Pickup and Delivery is considered, which is similar to coordinating a taxi service.
ii Table of Contents
Abstract ...... ii Table of Contents ...... iii List of Tables ...... v List of Figures ...... vi 1 Introduction ...... 1 2 Definitions and Basic Concepts ...... 4 2.1 The Problem: Dynamic Task Fulfillment ...... 4 2.2 Multi Agent Systems ...... 7 2.3 The Efficiency Improvement Advisor ...... 10 2.3.1 The extract step ...... 13 2.3.2 The optimize step ...... 15 2.3.3 The derive step ...... 17 3 The Extended Efficiency Improvement Advisor ...... 19 3.1 The Working Cycle of the EEIA ...... 20 3.2 The derive step ...... 22 3.3 Simple Example ...... 25 4 Simple Application: Whack-a-mole ...... 29 4.1 The Environment ...... 33 4.2 Dynamic Task Fulfillment Perspective ...... 35 4.2.1 Task Similarity ...... 35 4.2.2 Optimization Criterion ...... 36 4.2.3 Bounding Function ...... 38 4.3 Agents ...... 39 4.4 Required Modifications of Agents for Working with An Advisor ...... 43 4.4.1 Providing Histories ...... 43 4.4.2 Handling Rules ...... 45 4.4.3 Rule Conflicts ...... 48 4.4.4 New Agents ...... 50 5 Complex Application: Pickup and Delivery ...... 53 5.1 The Environment ...... 57 5.2 Dynamic Task Fulfillment Perspective ...... 59 5.2.1 Task Similarity ...... 60 5.2.2 Optimization Criterion ...... 60 5.3 Agents ...... 64 5.4 Required Modifications of Agents for Working with An Advisor ...... 68 5.4.1 Providing Histories ...... 68 5.4.2 Handling Rules ...... 69 5.4.3 Rule Conflicts ...... 70 6 Experiments ...... 71 6.1 Generating Base Run Instances ...... 72 6.1.1 Whack-a-mole ...... 72 6.1.2 Pickup and Delivery ...... 74
iii 6.2 Degree of Dynamism ...... 76 6.2.1 Whack-a-mole ...... 78 6.2.2 Pickup and Delivery ...... 81 6.3 Static Variant ...... 84 6.3.1 Whack-a-mole ...... 85 6.3.2 Pickup and Delivery ...... 86 6.4 Full Runs ...... 88 6.4.1 Whack-a-mole ...... 91 6.4.2 Pickup and Delivery ...... 93 6.4.3 More Vehicles ...... 93 7 Related Works ...... 100 7.1 Control Theory ...... 100 7.2 Whack-a-mole ...... 102 7.3 Pickup and Delivery ...... 104 7.3.1 How pre-determined are an agent’s actions? ...... 106 7.3.2 How does the system handle new requests mid-execution? ...... 107 7.3.3 What is the impact of an agent/component failing? ...... 108 7.3.4 What happens when communication fails mid-execution? ...... 109 7.3.5 Which agents require constant communication? ...... 111 7.3.6 How much variation is there in vehicle size? ...... 112 7.3.7 How can tasks be given emphasis or priority? ...... 113 7.3.8 What is the optimization criterion? ...... 113 7.3.9 What limitations are there on simultaneous jobs? ...... 115 7.3.10 What ability is there to cancel a task? ...... 116 8 Conclusion ...... 117 Bibliography ...... 121 A Optimization Methods ...... 126 A.1 Genetic Algorithm ...... 126 A.2 Branch and bound ...... 130
iv List of Tables
5.1 Customer requests made in advance, to allow planning...... 54 5.2 Based on the known-ahead requests, the driver can make a plan...... 54 5.3 In retrospect, all fares fulfilled, including dynamic ones...... 56
6.1 Advised single hammer FIFO in the static variant of Whack-a-mole, quality rela- tive to a plan...... 85 6.2 Advised 2 hammer NN in the static variant of Whack-a-mole, quality relative to a plan...... 85 6.3 Average efficiency of executing plans in the static variant of PDPTW...... 87 6.4 The effect of δ on the knowledge set...... 90 6.5 Comparison of the quality (Avg. Hits better than base system) of solutions achieved by base system (single hammer FIFO), system with EIA and system with EEIA for larger values of m...... 94 6.6 Comparison of the quality (Avg. Hits better than base system) of solutions achieved by base system (multi-hammer NN), system with EIA and system with EEIA for larger values of m...... 95 6.7 Comparison of the quality (total time over all run instances of an experiment) for Pickup and Delivery with 2 vehicles and measuring efficiency by time, varying values of m...... 96 6.8 Comparison of the quality (total time over all run instances of an experiment) for Pickup and Delivery with 2 vehicles and measuring efficiency by distance, varying number of vehicles...... 99
A.1 Some parameters adjusted for problem size, where m is the number of tasks. . . . . 130
v List of Figures and Illustrations
2.1 A Multi Agent System...... 7 2.2 A Multi Agent System under advice...... 10 2.3 The actions of the original advisor, the EIA (from [SD+10])...... 11 2.4 Types of Exception Rules ...... 17
3.1 The actions of the EEIA...... 21 3.2 High-level example run instance...... 27
4.1 Example mole schedule, and comparison of hammer choices...... 31 4.2 The Whack-a-mole environments, varying sizes (are not required to be square). . . 33 fifo 4.3 The application of an ignore rule, ata j , to a queue for g ...... 46 ¬ A nn 4.4 The application of an ignore rule, ata , to a list of tasks distances for g . . . . . 47 ¬ j A 4.5 The application of an proactive rule to a queue for gfifo...... 47 4.6 The application of an proactive rule to a list of tasksA distances for gnn...... 48 4.7 An Ignore rule conflicting with a proactive rule for the same task.A This is the difference made by order of rule application...... 49
5.1 Larger cities and towns on the Trans Canada, labeled with distances separating them. 53 5.2 The plan, shown as the graph of the highway extended over the day (a space-time diagram). A blue line is used to represent the lifeline/trajectory of the vehicle. . . . 54 5.3 An example fare, illustrating the actual time window...... 55 5.4 A sequence of requests being fulfilled by a single vehicle, some known in advance, some dynamic...... 56 5.5 The standard pickup and delivery environment...... 57 5.6 The infochemical gradient. The vehicle’s infochemicals are in red, the pickup location’s infochemicals are in green, and the delivery location’s infochemicals are in blue. The depot’s infochemicals are omitted from the diagram...... 66 5.7 The application of an ignore rule to a utility calculation for gDIC...... 69 5.8 The application of a proactive rule to a utility calculation forA gDIC...... 70 A 6.1 The Degree of Dynamism experiment performing on varying problem sizes, using single hammer FIFO under advice (using Branch-and-Bound). Each figure is a single bri. Red line indicates performance without advice...... 79 6.2 The Degree of Dynamism experiment performing on varying problem sizes, using multi hammer NN under advice (using GA). Each figure is a single bri. Red line indicates performance without advice...... 80 6.3 The Degree of Dynamism experiment repeated on the 5 4, using multi hammer NN under advice (using GA), with 3 different choices of bri× . Each figure is a single bri. Red line indicates performance without advice...... 80 6.4 The Degree of Dynamism experiment performing on varying problem sizes, us- ing DIC under advice (using GA). Each figure is a single bri. Red line indicates performance without advice...... 81
vi 6.5 The Degree of Dynamism experiment repeated for 30 tasks in Pickup and Delivery with time measurement, with 5 more choices of bri. Each figure is a single bri. Red line indicates performance without advice...... 83 6.6 The coin-flipping procedure for generating run instances with partially recurring tasks...... 89
vii Chapter 1
Introduction
Both industry and games have plentiful examples of problems where action is required despite the fact that the problem itself is changing over time, or complete description of the circumstances is not initially available. Many of these problems describe machines that break unpredictably and must be repaired or replaced. Other similar problems describe services where customers continu- ally make requests, which are then satisfied by workers. The transportation industry also has many of these problems. Practically every type of transportation work has a variant where jobs must begin before all requests are received.
Many, if not all, of these problems can be described under the Dynamic Task Fulfillment (DTF) formalization [SD+10]. This is a very general and flexible method for describing problems in which knowledge is revealed over time.
Generally, solutions to dynamic problems (such as DTF problems) fall into two basic classes. The
first is Multi-Agent Systems (MAS), where a collection of usually autonomous agents is deployed
[WH04]. They complete the required work by making a sequence of locally good decisions based on the limited knowledge available. These solutions have the advantage of being highly flexible and resilient, at the cost of efficiency due to the local perspective. The second class of solutions includes those where a central optimization is done based on whatever knowledge is available. Plans like this must be re-optimized and redistributed every time new knowledge is acquired. Central re- optimization solved the inefficiency issues of local decisions, but introduces a single point of failure and a heavy reliance on communication, in addition to a heavy computational load which is not distributed.
One previous effort to capture the positive qualities of both types of solutions was the Efficiency
1 Improvement Advisor (EIA) [SD+10]. The EIA is an advice and analytics component which gathers observations from agents, compiles these observations into a broader view of the world, and makes incremental corrections (via exception rules) to the behavior of these agents. It works on autonomous agents and gives a partial efficiency gain in the direction of the centrally optimized solutions, but without becoming an essential component of the system.
In this thesis we present an extension to the EIA which allows the inclusion of certain knowledge into the existing knowledge of agent testimonies. Exploiting disparate sources of knowledge allows a further improvement on efficiency, while preserving the previous strengths of the EIA. Specifi- cally, this extension does not result in an essential component or centralized controller. Where a
MAS solution does not have a single point of failure, the addition of the EIA or this extension does not create a single point of failure. Additionally, allowing this inclusion of certain knowledge is not only a further efficiency improvement in the average case, but is also a direct competitor to the centrally optimized systems in those cases where complete knowledge of the future is available.
We call this extension the Extended Efficiency Improvement Advisor (EEIA).
To verify these qualities of the EEIA we have used 2 different concrete instantiations of DTF:
Whack-a-mole and Pickup and Delivery. The EEIA is defined at the level of DTF, which is a broad class of problems, so it is natural to question if results achieved in one setting are to be expected across all of DTF. To address this concern, an empirical evaluation in 2 different settings shows broader generality of results. Furthermore, strong and consistent results are seen using 3 different quality measures: distance, time, and hit/miss ratio.
The remainder of this thesis is structured as follows. Chapter 2 contains basic concepts and formal definitions for MAS, Dynamic Task Fulfillment, and the original Efficiency Improvement Advisor.
Chapter 3 gives the formal description of the main contribution of this thesis, the Extended Effi- ciency Improvement Advisor. Chapter 4 describes the game of Whack-a-mole, how this game ap- pears through the lens of Dynamic Task Fulfillment, and the dynamic solutions (Nearest-Neighbor and First-in-first-out) which will be receiving advice. Chapter 5 mirrors Chapter 4 in structure
2 while it describes an important industrial application, Pickup and Delivery. The dynamic solution receiving advice for this problem is Digital Infochemical Coordination. Chapter 6 describes exper- iments performed in both Whack-a-mole and Pickup and Delivery, giving empirical evidence of the
EEIA’s abilities. Chapter 7 covers the related works. Finally, Chapter 8 contains the conclusions and possible future works.
3 Chapter 2
Definitions and Basic Concepts
In this chapter, we will formally introduce the general problem we are interested in: Dynamic
Task Fulfillment. It is a concept on a level high enough to encompass both real world industrial problems and games. Since the other concepts discussed in this thesis are meant to be as broadly applicable as possible, they will also be discussed at this level of abstraction.
A frequently chosen approach to these type of problems is using Multi Agent Systems. Multi
Agent Systems (MAS) are technically general enough to describe any approach, and also offer a formalism and point of view which are extremely useful for dynamic settings.
Finally, the Efficiency Improvement Advisor concept will be given as a enhancement for MAS when applied to Dynamic Task Fulfillment in general. Combined, these three concepts form the foundation for the subject of this thesis.
2.1 The Problem: Dynamic Task Fulfillment
In Dynamic Task Fulfillment (DTF) [SD+10] a set of agents, A, is responsible for solving an ordered set of tasks, T, with the added difficulty that these tasks are not necessarily known in advance and will only be revealed over time. This sequence of tasks, which are revealed to the agents, is called a Run Instance. Intuitively, a Run Instance can be thought of as a single day of work. Typically, the expectation is that the agents will solve every task in the Run Instance, but this depends on how the success of the agents is measured. Expanding on this analogy, a sequence of Run Instances (or days), is called a Run, and can be used to represent a week or a month of work. Representing problems in a sequence this way offers the possibility for patterns to exist over
4 longer time periods, and for learning to be done on those patterns.
Formally, each run instance occurs in a discrete time interval:
Time = [0,end] Z ⊆ where the end depends on the run instance and the definitions of the specific problem domain.
Definition 2.1.1 (Run Instance). A Run Instance is a m-length list of Events,
ri j = (ev1,ev2,...,evm).
where,
Definition 2.1.2 (Event). An Event is a task/time pair evi = (tai,ti) where ti Time indicates when ∈ the task is announced.
and,
start end start end Definition 2.1.3 (Task). A Task, tai = (detaili,t ,t ),t ,t Time, contains a time win- i i i i ∈ dow in which the task must be fulfilled, and other problem dependent attributes in detaili.
Combining this, a run instance, ri, will have the form:
ri = ((ta1,t1),(ta2,t2),...,(tam,tm))
Finally,
Definition 2.1.4 (Run). A Run is a k-length list of Run Instances, run = (ri1,ri2,...,rik).
Where a run, r, will have the form
r = (((ta1,1,t1,1),(ta2,1,t2,1),...,(tam1,1,tm1,1)), ...,
((ta1,k,t1,k),(ta2,k,t2,k),...,(tamk,k,tmk,k))).
The responses of the agents in A to the events in a run instance result in an emergent solution sol
of the run instance:
Definition 2.1.5 (Solution). A Solution is a sequence of assignments, sol = (as1,...,asm), describ- ing which agents, in A, uniquely fulfill which tasks, in T.
5 where,
0 0 0 0 Definition 2.1.6 (Assignment). An Assignment is a triple, asi = (ta , g ,t ), which means task ta i A i i i was started by g0 at time t0. A i i Combining these definitions, a solution will have the form:
sol = ((ta0 , g0 ,t0 ),(ta0 , g0 ,t0 ),...,(ta0 , g0 ,t0 )) 1 A 1 1 2 A 2 2 m A m m 0 0 0 0 0 0 0 where ta ta1,...,tam , ta = ta for all i = j, g A, t t , t Time. m ∈ { } i 6 j 6 A i ∈ i ≤ i+1 i ∈ To determine the efficiency of the agents in A in solving a run instance, we need to associate with each solution sol a quality measure qual(sol).
Definition 2.1.7 (Solution Quality). The quality of a solution is a function: qual : Solution R, → used as optimization criterion.
The convention is that a lower qual(sol) indicates a more efficient solution. And where solopt is the optimal solution, qual(solopt) qual(sol), for any other solution. It should also be expected ≤ that very similar solutions will have very similar efficiencies (most of the time). Beyond these rough guidelines, there is enormous flexibility in the choice of the qual function.
It should be noted that these definitions leave many design choices open:
Are time windows open or closed? • Can more than one agent fulfill a task? • Can an agent fulfill more than one task? • Many similar questions could also be asked. The important thing to realize is that any combination of answers to these questions can be represented within the Dynamic Task Fulfillment structure.
We do not acknowledge these constraints at this level of abstraction. The responsibility for en- forcing these things would normally be left to the solution quality measure, as they are all problem domain specific. We have chosen to enforce a condition of “no more than one assignment per task” within our optimizers.
6 2.2 Multi Agent Systems
The foundational concept, which Dynamic Task Fulfillment and the majority of other concepts in this thesis are built upon, is Multi Agent Systems [SD+10]. These are systems where a task is given to a collection of separate but interacting components called agents. These agents usu- ally make simpler local decisions, but in some exceptional cases can have a global perspective.
They can be deterministic, random, or intelligent. They can be controlled centrally, but are of- ten autonomous. Sometimes communication between agents is available at all times, sometimes only partially available. Sometimes it comes at a cost, and sometimes communication is forbidden completely.
g g g ... g A 1 A 2 A 3 A K
nv E
Figure 2.1: A Multi Agent System.
It is sometimes the case that no individual agent is capable of completing the required work, but the system as a whole can achieve it. Alternatives are problems where a single agent could solve the entire problem, but several cooperating agents can solve it faster. This leaves a choice of how agents organize themselves, with or without communication.
What follows is a very general definition for agent [Hud11], which could likely be used in any application, and any of the cases described above:
Definition 2.2.1 (Agent). An Agent g = (Sit,Act,Dat, fAg), where: A Sit - set of possible situations the agent can perceive (from its environment) • Act - set of possible actions the agent can perform •
7 Dat - set of possible value combinations of the agent’s internal data areas •
fAg : Sit Dat Act - The agent’s decision function • × → And, many of these agents working together is formally defined as:
Definition 2.2.2 (Multi Agent System). A Multi Agent System is a pair (A, nv) where: E
A - is the set of all agents g1, g2,..., gK . • {A A A } nv - set of possible states of the environment. •E A set of agents interacting with their environment is illustrated in Figure 2.1.
While potentially any computational problem could be addressed in this way, this formalism is particularly good for approaching dynamic problems, such as Dynamic Task Fulfillment prob- lems. It has lower communications requirements, is more fault-tolerant, and is easier to scale
[WH04].
In most practical cases of Dynamic Task Fulfillment run instances, there will be events (tai,ti) and (ta j,t j) where ti < t j. The implication is that not all information will be made available at once, and certainly not at the beginning of the time interval. Approaches to static variants of these problems are no longer useful as they require full knowledge to generate a full solution. Static, in this context, refers specifically to those problems where all knowledge is available in advance (also known as a priori optimization [BC+07]).
Leaning on transportation for examples of Dynamic Task Fulfillment problems, it is considered a basic strategy (in [BCL10]) to apply one of the aforementioned static approaches, and simply re- optimize and re-distribute each time new tasks are revealed. Some authors ([MS+10], [DPH07]) describe this as non-agent-based, however it is better to refer to these as cases which are based on agents that are non-autonomous, as it will help keep the various downsides in mind:
1. Optimization is computationally expensive; re-optimization is often equally expen-
sive.
8 2. Redistributing plans may happen very frequently, and be very expensive in terms of
communication.
3. Unless every agent is receiving a revised plan, no agent should. Chaos would result
if agents were following incompatible plans. This requires very reliable communi-
cations.
The alternative to iterating a static strategy is to use a strategy where agents are autonomous and
self-organizing. One such strategy (which could possibly be applicable across all of Dynamic
Task Fulfillment) is the Contract Net Protocol [Sm80]. The Contract Net Protocol works as an
auction simulation. Each time a task is announced agents calculate their own estimated cost of
being assigned the task and use this value to determine a bid. The winner of the auction is offered
the assignment (which it may reject, triggering a second round of bidding).
This and other dynamic strategies can often mitigate or entirely eliminate the concerns above.
1. The computational load is distributed over many “processors”.
2. Communication failures and other unexpected problems will often be compensated
for by the normal behavior of the agents.
While this sounds attractive, there is a trade-off faced when choosing these strategies. The purely dynamic strategies with autonomous agents rely on locally good decisions, which in general pro- duce much less efficient solutions than the centralized, static strategies.
In a way that is analogous to the iterative re-optimization (which adapted static approaches to work on dynamic problems), there are also counters to the shortcomings of dynamic approaches. It is possible to adapt a dynamic approach, improving its efficiency at least partially toward that of a static approach. This is where the Efficiency Improvement Advisor comes into play.
9 2.3 The Efficiency Improvement Advisor
The EIA is an advice and analytics component [SD+10]. It is positioned so that it does not require any far reaching vision, nor does it require the ability to communicate over any long distance. All information about what has taken place in the environment comes post-mortem. Other agents in the system deliver their histories to the EIA at the end of each day (Run Instance), when they return home (or when communications become available). Agents interacting with their environment under advice from the EIA is illustrated in Figure 2.2.
gEIA A
g g g ... g A 1 A 2 A 3 A K
nv E
Figure 2.2: A Multi Agent System under advice.
Similarly any instruction given to other agents by the EIA is done prior to deployment, when they are near or communication is available. It is essential to the concept of the EIA that it remain a non-vital component of the system. If the system did not have a single point of failure before the
EIA was added, it should not have one after.
Any repetition occurring sufficiently often that can be detected in the histories provided by agents is knowledge for the EIA. This knowledge is used to decide what instructions to give, and what corrections to make in agent behaviors. Corrections are then done by providing the agents with exception rules (see Section 2.3.3).
The 6 main actions of the EIA are illustrated in Figure 2.3. The EIA will gather knowledge about the world (not directly though, it is provided by other agents). This knowledge is processed into
10 Advisor
Extract Optimize recurring tasks solution of Transform from global recurring Derive local agent histories history tasks rules from into global history optimal solution
Data model (advisor states, agent knowledge, Receive environment knowledge, rule sets, Send local agent intermediate results, ...) derived rules histories to agents
histories rules
Basic MAS
Figure 2.3: The actions of the original advisor, the EIA (from [SD+10]). a plan, and converted into exception rules, which are then distributed to the agents before they are deployed.
Each step is described in more detail:
receive - Collect a individual history Hi from each agent under advice. Hi will • contain every observation and action made during the prior run instance, as well as
internal states and individual decisions.
transform - Takes the local histories, H1,...,Hn, of each agent and combines the • local histories into a Global History GHist, essentially a sequence of run instances.
extract - distills from GHist, the recurring knowledge set: (tarec,...,tarec) (see • 1 p Section 2.3.1).
0 0 0 optimize computes an optimized solution optrec = ((tarec, g rec, t rec),..., (tarec, g rec, • 1 A 1 1 p A p 0 0 0 t rec)), g rec A, t rec Time, for the recurring tasks found in the previous step. p A j ∈ j ∈
11 If the previous emergent solution, last, does not have sufficient room for improve-
ment, gEIA will not create new rules. A This is decided by a constant ratio, qualthresh. Formally, the rules are created if
qual(last)/qual(optrec) > qualthresh.
derive creates for each agent gi a set Ri of exception rules, if the agents did not • A perform well. Note that an Ri can also be empty.
send communicates the set Ri to gi for each agent the next time communication • A with it is possible.
These steps will be executed after each run instance in a run, in preparation for the next, the implication being that this is done during the vehicles’ down time. Since it is not being done concurrently with the normal work, the agents should be available for communication (even though they may not be available while fulfilling tasks). This one of 4 main requirements of the EIA
[Hud11]:
1. Agents must be able to communicate (histories and rules) with the EIA between run
instances.
2. Agents must be modified to interpret and follow exception rules.
3. Runs must contain a subset of recurring events.
4. Recurring event-sets in runs must be constant (over long enough intervals) to allow
incremental correction.
The receive and send steps are simply communications between the EIA and other agents; they are no more complicated than exchanging information. The transform step is also very simple, the feedback from each agent is compiled into a record of everything that has happened in the run so far.
The remaining 3 steps are complicated enough to be described separately.
12 2.3.1 The extract step
The extract step is when the EIA’s learning occurs. This involves conversion of the histories gath-
ered in the receive and transform steps into a list of tasks. This step is responsible for detecting any task which occurs sufficiently often in the run. These tasks are predicted to occur in the near future run instances, and we refer to them as recurring tasks.
Any algorithm (clustering or otherwise) used to this end will have the following form in relation to Dynamic Task Fulfillment:
Definition 2.3.1 (Clustering Algorithm). Clustering will reduce a list of Run Instances (the global
history) to a single run instance with the intention that the result will include only the recurring
Events from the input.
cluster : RunInstance∗ RunInstance →
The EIA’s choice of clustering algorithm is Sequential Leader Clustering [Har75]. It is extremely simple, but effective. The main strength of this algorithm is that it does not need to know the number of clusters in advance. The actual number of clusters can be as low as 0, where no tasks recur, or as high as the entire run instance. Whatever learning method that is used to find recur- rence is also responsible for determining this number. With this requirement, many other popular clustering algorithms, such as k-means [Har75], would be unsuitable.
An obvious downside to using Sequential Leader Clustering is that the order in which data points are read has a effect on the outcome that is both significant and predictable. If the order is chosen by a malicious attacker, single clusters could become 2 smaller clusters (or vice versa), which would be detrimental to the system’s efficiency. Luckily, this is not a concern for the Advisor, as the only source for this data comes from its own transform step.
The problem-specific aspects of clustering are hidden in a single function.
Definition 2.3.2 (Task Similarity). Task similarity is a function sim : Task Task R, which × →
13 returns 0 for identical tasks and a positive number otherwise.
The convention used by sim is that more similar pairs will return a lower value, bounded below by
0, which should indicate that tasks are identical. It is also expected that small changes to tasks will result in relatively small changes to similarity.
Throughout the explanation of this algorithm, the following tunable parameters will be used (rec- ommended values adopted from [SD+10]):
Parameter Name Description Recommended Value
minsim Minimum similarity where tasks can clustered together. 10
minocc Minimum ratio of occurrences to run instances. 0.7
pastwind Number of run instances from history to be included. 5 To begin with, we retrieve the most recent run instances from the collection of global histories
collected so far. We use a sliding window (of length pastwind) on the most recent run instances
in the agent histories to limit those under consideration. Those tasks which were recurring early
in the run may not be recurring later. The sliding windows gives the ability to forget and focus on
what is recent.