3.3 Agents Behavior
Each agent has to decide its next action: whether to
increase or decrease its value, and by what amount,
in order to lower the criticality of its neighborhood as
quickly as possible. Its output y at timestep t is:
y
t
= y
t−1
+ a
t
Where a
t
is the decided action. The decision is based
on two dynamically adjusted internal variables:
• δ ∈ R
+
, with δ
min
≤ δ ≤ δ
max
is the amplitude of
the action, δ
min
and δ
max
are user-defined parame-
ters, which will be discussed later ;
• σ ∈ N with −n ≤ σ ≤ n indicates the sign of the
action, n is a user-defined parameter of the agent,
which will be discussed later.
These two variables directly define a:
a :=
(
δ ×
σ
|σ|
if σ 6= 0
random(−δ, δ) otherwise
The sign of σ is the sign of the action, and the abso-
lute value of σ reflects how much the agent is con-
vinced that the sign is correct. If σ = 0, the decision
is a coin flip between −δ and δ. We introduced ran-
domness here because all agents perceive and decide
simultaneously, thus falling into the El Farol bar prob-
lem (Whitehead, 2008).
3.3.1 Adaptation
Each agent dynamically manages its own internal δ
and σ variables, and decide how to adapt them. This
section explains how an agent adjusts its δ and σ.
Thanks to the jacobians provided by the simula-
tors connected on its output, the agent computes a
criticality jacobian, giving him an estimation of the
variations of the criticalities of its neighborhood. The
agent splits its neighbors into two groups, regarding
their criticality jacobian:
• the most critical group contains the most critical
neighbor (i.e. the neighbor with the highest crit-
icality) and all the neighbors whose criticality ja-
cobian has the same sign as the criticality jacobian
of the most critical neighbor. This means that if
the agent helps its most critical neighbor, its ac-
tion will also help all the other neighbors of this
group.
• the opposite group contains all the neighbors
whose criticality jacobian are of opposite sign
with the criticality jacobian of the most critical
neighbor. This means that if the agent helps its
most critical neighbor, its action will aslo hurt all
the neighbors of this group.
We call worst neighbor the most critical neighbor,
and opposite worst neighbor the most critical neigh-
bor from the opposite group. The goal for the agent
is then to help its worst neighbor while preventing its
opposite worst neighbor to become the worst neigh-
bor.
The agent observes four indicators in its environ-
ment to decide how to adjust its δ and σ:
• the direction of variation of the criticality of its
worst neighbor,
• the direction of variation of the criticality of its
opposite worst neighbor,
• the direction of variation of the difference be-
tween the worst neighbor’s criticality and the op-
posite worst neighbor’s criticality,
• the correlation between the sign of σ and the sign
of the criticality jacobian of the worst neighbor,
which indicates if the action of the agent is cur-
rently helping the worst neighbor or the opposite
worst neighbor.
Before computing its action, the agent adapts its δ
and σ according to a small set of rules conditioned
by these four indicators. These rules are presented in
table 1.
”Strengthen σ” means its absolute value is in-
creased without changing its sign: if σ is positive then
σ is incremented by one (decremented by one other-
wise). Likewise, ”weaken σ” means its absolute value
of σ is decreased without changing its sign: if σ is
positive then σ is decremented by one (incremented
by one otherwise). Finally, ”increase δ” means δ is
multiplied by α > 1 and ”decrease δ” means it is di-
vided by β > 1. α and β are user-defined parameters.
The idea underlying this set of rules is to decrease
as fast as possible the criticality of all the neighbors.
The agent seeks to maximize its δ while reducing the
difference between the criticality of the worst neigh-
bor and the criticality of the opposite worst neighbor.
The worst case for an agent is when the condi-
tions of line 1 occur: the criticality of both the worst
neighbor and the opposite worst neighbor are increas-
ing, the highest criticality faster than the other. In
this case, the agent adjusts σ and δ in order to give
more help to its worst neighbor and less to the oppo-
site worst neighbor.
The best case is in line 8, when the criticality of
both the worst neighbor and the opposite worst neigh-
bor are decreasing, and the highest criticality is de-
creasing faster. This is an ideal situation if σ = n or
σ = −n, meaning that the agent is certain about its
current action.
Principles and Experiments of a Multi-Agent Approach for Large Co-Simulation Networks Initialization
61