6.2 Generic Advisor Model
6.2.5 Derive Rules from Optimal Solution
The main task of the action derive ∈ ActEIA is the derivation of rules from the
optimal solution for the set of recurring tasks calculated by the previous action, which can then be sent to the agents for improving their solution, if necessary. Therefore, AgEIA has to perform four essential steps, constituting sub-actions of
derive:
1. Identif y the solution of the emergent system for the set of recurring tasks 2. Assess the quality of the emergent solution
3. Determine differences between the emergent solution and the optimal solution, if the emergent solution is much worse than the optimal solution
4. Create rules for the agents that do not behave optimally 6.2.5.1 Identification of Emergent Solution
The sub-action identif y ∈ ActEIA is used to identify from the global history of the
system GHistA generated by the action transf orm the solution solemerg ∈ SolP
the emergent system has produced for the set of recurring tasks stored in datrec EIA
at last. The action yields unordered assignments for all of the tasks in the set of recurring tasks of the form ((ta1, Ag1, t1), (ta2, Ag2, t2), . . . , (tak, Agk, tk), which can
then be put together to create the emergent solution. Definition 6.26 (Identify)
The identification of the emergent solution solemerg for a set of recurring tasks is a
function defined as
identif y: DatGHistA
EIA × Dat T asks EIA → Dat Solemerg EIA where • DatGHistA
EIA is the set of all possible global histories of a set of agents A stored
in DatEIA
• DatT asks
EIA is the set of all possible sets of recurring tasks stored in DatEIA
• DatSolemerg
EIA is the set of all possible sets of emergent solutions of a set of agents
stored in DatEIA
However, identifying the emergent solution created by A for the recurring tasks is not trivial. Very often, there will be other tasks mixed into fulfilling the recurring tasks, or in the last run instance not all of the recurring tasks might have occurred, as the size of the clusters representing the recurring tasks can be smaller than k. The fact that the agents fulfill other tasks while fulfilling the recurring tasks means that AgEIA cannot determine the quality based on measuring what really happened. For
6.2 Generic Advisor Model 169
example, between fulfilling two tasks of the recurring task set in a transportation domain, a vehicle agent might have to drive to a far off location to fulfill a not recurring task in a particular run instance. Adding the traveled distance of this agent between the two recurring tasks to the travel cost (if this is the quality criterion) would worsen the emergent solution, although in other run instances the recurring tasks are solved well.
But for such an application a lower bound for the costs that would emerge can be provided, if there were no additional tasks, which is the distance the agent has to travel after the first recurring task to start performing the second one. Such lower bounds are possible to be determined for many applications and many quality criteria. If the quality of such a lower bound is far from the optimum, then advice from AgEIA will be useful for many run instances.
Given that the last solemerg and its quality are already an approximation, the
problem of a recurring task not occurring in the last run instance can now be solved, too. AgEIA determines, which agent fulfills the task in the solemerg by going back
one more run instance (or several). This also allows to determine the correct position of the task in the sequence of tasks the agent performs.
6.2.5.2 Assessing the Solution Quality
In order to determine, if an optimization of the emergent solution is necessary and worthwhile, the sub-action assess ∈ ActEIAcompares the qualities of both the emer-
gent solution and the optimal solution. If the emergent solution is of an acceptable quality compared to the optimal one, i. e. qual(solemerg)/qual(solopt) > qualthresh
for a user defined quality threshold 0 < qualthresh ≤ 1, an optimization of the emergent solution is not worthwhile, e. g. if the emergent solution is within 90% of the optimal one, and the work of AgEIA is done until new information arrives.
Otherwise, AgEIA has to optimize the emergent solution. qualthresh depends on
the concrete application domain and should be carefully evaluated. 6.2.5.3 Determination of Differences Between Solutions
In case that an optimization of the emergent solution is necessary, the sub-action determine ∈ ActEIA compares the differences between both the emergent and the
optimal solution. Therefore, the identified assignments in both solutions are sorted by the order in which the tasks are performed in the solution. This sorting yields the solutions solopt0 and sol0emerg. The sorted solutions are then compared sequen- tially to find the first assignment that differs in both solutions. Given that sol0opt= ((ta1
1, Ag11, t11), . . . , (tap1, Agp1, t1p)) and solemer0 = ((ta21, Ag21, t21), . . . , (ta2p, Ag2p, t2p)) then
AgEIA identifies the assignment j : ta1j 6= ta2j ∨ Agj1 6= Agj2 such that ∀i < j : ta1i =
ta2i ∧ Ag1
i = Agi2. Since both solutions are sorted according to the tl-values, this
is essentially the first assignment of a task to an agent for which the agents in A deviated from the optimal solution for the recurring tasks.
to several reasons: First, the order of the optimal solution is usually not completely different from the order of the actual solutions. In many cases, the order is really only different because the tasks were served by different agents (a suboptimal behavior) and therefore will be correct as soon as the advice that changes the assignment is adapted by the agents. Second, the order is highly sensitive to noise tasks that are not part of the recurring tasks. The order can therefore change spontaneously without real impact on the recurring tasks. Third, exception rules that for instance let agents ignore tasks are not in all cases fit to establish a certain order. Exception rules that for instance boost tasks let the agents prefer the tasks that should be serviced before the others.
6.2.5.4 Rule Creation
To force the emergent system to behave in a similar way as the optimal solution in future, the sub-action create ∈ ActEIA instantiates based on the determined
difference of the assignments a new exception rule (see Definition 6.6) for agent Agj2 to change its behavior when it encounters a situation that was leading to the suboptimal behavior.
Definition 6.27 (Rule creation)
The creation of a rule is a function defined as
create: Assign × Assign → Rule where
• Assign is a set of assignments • Rule is a set of rules
The event and conditions specified by sit0 respectively dat0 of an exception rule r0 are derived from the descriptions of the assigned tasks. For determining sit0 and
dat0, AgEIA looks up the assignment (sit, dat, actta2
j) ∈ GHistAg2j, which represents
in the history of Ag2
j the point in time when it choses to perform actta2 j. (sit
0, dat0)
is then an abstraction of sit and dat. This tuple is application dependent and tries to cover not only ta2
j, but the whole cluster of tasks from the action extract of which
ta2j is a member of. The types of exception rules that are able to change the behavior of an agent depends on the application domain and the basic MAS. However, the action of the exception rule has to change the sequence of actions an agent performs when the predicate for its current situation is true.
The exception rules created for an agent Agi are stored in the data structure
datRulei
EIA . The possible rule set for this agent is denoted as Dat Rulei
EIA . Consequently,
the possible rules sets for all agents in A with m = |A| are denoted as DatRuleA EIA ⊆ Dat Rule1 EIA × Dat Rule2 EIA × . . . × Dat Rulem EIA (6.5)
6.2 Generic Advisor Model 171 Definition 6.28 (Derive)
The derivation of rules and is a function defined as derive: DatGHistA
EIA × Dat T asks EIA × Dat Solopt EIA × Dat Solemerg EIA → Dat RuleA EIA where • DatGHistA
EIA is the set of all possible global histories of a set of agents A stored
in DatEIA
• DatT asks
EIA is the set of all possible sets of recurring tasks stored in DatEIA
• DatSolopt
EIA is the set of all possible optimal solutions for a set of recurring tasks
and a set of agents stored in DatEIA
• DatSolemerg
EIA is the set of all possible emergent solutions for a set of recurring
tasks and a set of agents stored in DatEIA
• DatRuleA
EIA is the set of all possible rule sets for a set of agents A stored in
DatEIA