<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Framework towards the Verication of Emergent Properties in Spatial Multi-Agent Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Isidora Petreska</string-name>
          <email>ispetreska@seerc.org</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Petros Kefalas</string-name>
          <email>kefalas@city.academic.gr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marian Gheorghe</string-name>
          <email>m.gheorghe@dcs.shef.ac.uk</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Leontos Sofou Str.</institution>
          ,
          <addr-line>Thessaloniki 54626</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>South East European Research Centre</institution>
          ,
          <addr-line>SEERC</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Sheeld, Dept. of Computer Science Regent Court</institution>
          ,
          <addr-line>211 Portobello Str., Sheeld S1 4DP</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2011</year>
      </pub-date>
      <fpage>37</fpage>
      <lpage>44</lpage>
      <abstract>
        <p>Formal modelling of multi-agent systems (MAS) present many interesting challenges. In this extended abstract we present a framework of how formal modelling can lead towards identication and verication of emergent properties of spatial biology-inspired MAS. We discuss the problem in question as well as initial work done on the formal modelling side and the visual animation of these formal models.</p>
      </abstract>
      <kwd-group>
        <kwd>Biology-inspired MAS</kwd>
        <kwd>formal modelling</kwd>
        <kwd>emergence</kwd>
        <kwd>visual animation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Verication of the emergent behaviour of multi-agent systems is an extremely
complex task. It is not only the fact that the verication process, formal or
model checking, leads to combinatorial explosion, but also the fact that emergent
properties should be identied rst before there is an attempt to be veried. The
latter is not always straightforward. It is therefore desirable to combine several
formal with informal techniques that would be able to join forces towards the
verication of MAS.</p>
      <p>In agents that operate in a 2 or 3-dimensional space, such as biology or
biology-inspired agents, emergence is characterised by a pattern appearing in
the agents conguration at some instance during the operation of the system.
Trivial examples are colonies of social insects, like ants, birds, sh etc. The
type of emergence observed is related to the positioning in space, for example
line formation, ocks, schools, herds etc. Modelling such agents would require
modelling of their position and verication would require the exploration of a
state space developed by the combination of all agent positions evolved through
time.</p>
      <p>
        Someone could apply formal verication techniques, such as model checking,
under the assumption that we know what emergent property we are looking
for. With biology agents this is known in advance, since it has been observed
invivo. With articial agents it is not as simple, there is however an active research
that proposes a framework for empirical exploration of emergent formations [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
Consider the following example, known as aggressor-defender game.
      </p>
      <p>
        In the aggressor-defender game [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] there exist two teams of agents randomly
distributed in an environment: defenders (refer to them as friends ) and
aggressors (or enemies ). There are three dierent sub-games involved:
      </p>
      <p>All the agents defend at each turn everyone tends to position between a
friend and an enemy (such as they were defending the friend against the
enemy), Fig. 1 a).</p>
      <p>All the agents ee at each turn everyone tries to position in a way that a
friend is between themselves and an enemy (such as the friend protects them
from an enemy), Fig. 1 b).</p>
      <p>Some agents defend while the rest of the agents ee.</p>
      <p>Assuming that we can develop a formal model to be used for model checking,
it is interesting to consider what property to check for, that is, whether there
is an emergent behaviour in all the above three cases, if this MAS is massively
populated with similar agents.</p>
      <p>This work aims to set up a framework of study concerning the above
interesting problems and more in particular to demonstrate preliminary results
in identifying emergent behaviour through the automatic transformation of a
formal model to an executable visual simulation.
2</p>
    </sec>
    <sec id="sec-2">
      <title>A Proposed Research Framework</title>
      <p>
        The proposed research framework is depicted in Fig. 2. At the top, we start
by formal modelling of agents. Such formal models should be able to clearly
distinguish modelling of various types of behaviours, such as spatial or other
behaviours, communication, dynamic organisation etc. By separating the
various behaviours within the same formal model, it is possible to apply dierent
transformations which will facilitate further processing. On one hand, the spatial
behaviour determined by movement in space, can lead towards visual animation.
The latter is a useful informal tool which will help observing potential emergent
properties. On the other hand, suitable abstractions of spatial behaviour
together with the rest of the behaviours can lead towards simulation and logging
of time series data. These could be used to identify patterns of behaviours which
combined with the visual animation produce a set of desired properties. Finally,
the desired properties (including emergence) can be veried in the original
spatial agent model by model checking, as long as there is a way to transform the
original model into an equivalent, susceptible to formal verication, model.
We have been long experimenting with state-based modelling for agents and
MAS [35]. The state-based modelling method we use is X-Machines (XM). XM
are state machines with memory and instead of inputs triggering transitions,
they trigger functions which label the transitions. XM are able to communicate
through message exchange, thus forming Communicating X-Machines [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. XM
can also be wrapped around cells inspired by P-Systems [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] which are responsible
for the dynamic conguration of the MAS. This idea was successfully introduced
in the OPERAS framework (or more particularly OPERAS XC ) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Although,
XM can treat movement in space as any other behaviour, we have developed a
number of arguments why this spatial behaviour must be separately modelled
and treated [
        <xref ref-type="bibr" rid="ref3 ref5">3, 5</xref>
        ].
      </p>
      <p>
        spXMs represent a variation of Stream XMs by dening additional
components that allow specication of the current position and direction of an agent,
as well as to formally specify a movement of an agent within its environment.
Formally, a spXM is a 13-tuple; spXM = (Σ, Γ , Q, q0, M, m0, π, π0, θ, θ0, E,
Φ, F) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]), where:
Σ is an input set of symbols,
Γ is an output sets of symbols,
Q is a nite set of states,
q0 is the initial state,
M is an n-tuple called memory,
m0 is the initial memory,
π is a tuple of the current position, i.e. ( x, y ) when a 2D representation is
considered,
π0 is the initial position,
θ is an integer in the range 0 to 360, that represents a direction,
θ0 is the initial direction,
E is a set which contains elementary positioning operations: ei such as ei :
Π Θ ! Π Θ, such as direction, moving forward and moving to a specic
position.
Φ is a nite set of partial functions ϕ that map a memory state, position,
direction and set of inputs to a new memory state, position, direction and
set of outputs:
ϕ: M π θ Σ ! M π θ Γ ,
F is a function that determines the next state, given a state and a function
from the type Φ,
F: Q Φ Q, and
      </p>
      <p>
        A spXM model which demonstrates the third strategy is presented on Fig. 3.
The model’s states are Q={DEFENDING, STAYING_STILL, FLEEING}. There
are three corresponding functions: to defend, to stay still and to ee . The
memory stores the game strategy of the agent, an agent’s friend and enemy, as well as
its position and direction. The input consists of the friend’s and the enemy’s
current position. Finally, the output is the new position of the agent, because every
agent outputs its position to the other agents thus constructing a communicating
spX-machine system [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        spXMDL is the notation used to dene spXMs [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and it is modied version
of XMDL (see [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]) used in the standard XM. The functions in spXMDL
are coded in the form:
      </p>
      <p>#fun functor (($input$), ($memory tuple$),
($position$), ($direction$)) =
(($output$), ($memory tuple’$),
($position’$), ($direction’$)) =
where
$&lt;list of operations including positioning&gt;$</p>
      <p>Considering Fig. 3, the function defend is:
#fun defend ( ((?x_fr, ?y_fr),(?x_en, ?y_en)),
(?strategy, ?friend, ?enemy),
(?my_xcor, ?my_ycor),
(?curr_direction) ) =
(("move to ?new_xcor ?new_ycor"),
(?strategy, ?friend, ?enemy),
(?new_xcor, ?new_ycor),
(?curr_direction))
where
?new_xcor &lt;- (?x_fr + ?x_en)/2 and
?new_ycor &lt;- (?y_fr + ?y_en)/2.</p>
    </sec>
    <sec id="sec-3">
      <title>4 Visual Animation</title>
      <p>
        As part of the rst steps towards the achievement of formal verication of
emergent properties, we have developed a tool for automatic translation of a spXM
model to NetLogo [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. NetLogo is considered specialised into simulating
natural and social phenomena, including modeling of complex systems [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
The platform supports hundreds of agents to operate independently, providing a
clear picture of the micro-level behavior of the agents, as well as the macro-level
patterns within the whole system. The translator is based on a set of mapping
between formal constructs of XM and language primitives of NetLogo as well as
a library supporting all the spatial behaviours.
      </p>
      <p>For the aggressor-defender MAS, an executable counterpart is generated. The
output shows a visual animation with which the emergent spatial behaviour is
observable (Fig. 4), such as:</p>
      <p>The model in which all the agents defend, see Fig. 4 a), behaved as all the
agents quickly collapsed into a tight knot,
The model in which all the agents ee, see Fig. 4 b), behaved as a highly
dynamic group that expands over time towards the ends of the environment,
and
The model in which the agents randomly choose whether to defend or to
ee, see Fig. 4 c), exhibited there dierent behaviours. In some situations the
agents were all collapsed into a tight knot (as the model from the defender
game) with the dierence that this knot was now oscillating around the
environment (i), in others they were stationary, randomly distributed and
oscillating (ii), and in the last case the agents would form a ocking (iii).</p>
      <p>The case of this game clearly demonstrated that visual animation aided in
discovery of the system’s emergence and properties that could be veried at a
later stage, which in turn proved that even the small changes within the
individual agent rules might cause a huge dierence in behaviour of the system as a
whole.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Discussion and Conclusions</title>
      <p>
        The contribution of this paper is to present the overall picture of a framework
towards the verication of emergent behaviour of spatial MAS. We have also
reported progress so far, that is, a denition of spXM and a tool for automatic
transformation to NetLogo. Using this experience, the next steps in the
framework are instantiated (Fig. 2) as follows:
spXM can be transformed into a simulation tool that can generate a time
series data. Such tool may be FLAME [
        <xref ref-type="bibr" rid="ref14 ref15">14, 15</xref>
        ] which is used to animate XM
models with thousands of agents. FLAME, however, does not deal with the
spatial behaviour, which we have already covered by NetLogo.
      </p>
      <p>
        The logged time series data could be used as an input to a tool identifying
patterns, such as DAIKON [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. The output would be interesting properties
that combined with the emergent properties from visual animation could aid
us forming the logic temporal formulae to verify.
      </p>
      <p>The spXM can be suitably transformed into an equivalent model in SPIN,
PRISM or SMV [1719], which given the temporal formulae will verify that
all the desired properties hold in the original model.</p>
      <p>Of course the above would assume that a correct transformation from the
original model to equivalent models is possible, something which is an interesting
problem by itself.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>O.</given-names>
            <surname>Paunovski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Eleftherakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.J.</given-names>
            <surname>Cowling</surname>
          </string-name>
          :
          <article-title>Disciplined exploration of emergence using multi-agent simulation framework</article-title>
          .
          <source>Computing and Informatics</source>
          <volume>28</volume>
          (
          <issue>3</issue>
          ) (
          <year>2009</year>
          )
          <fpage>369391</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2. E.Bonabeau:
          <article-title>Agent-based modeling: methods and techniques for simulating human systems</article-title>
          .
          <source>Proceedings of the National Academy of Sciences</source>
          (
          <year>2002</year>
          ) 72807287 Washington, United-States.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>I.</given-names>
            <surname>Petreska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kefalas</surname>
          </string-name>
          ,
          <string-name>
            <surname>I.</surname>
          </string-name>
          <article-title>Stamatopoulou: Extending x-machines to support representation of spatial agents. Work in progress (</article-title>
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>I.</given-names>
            <surname>Petreska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kefalas</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Georghe: Population p systems with moving active cells</article-title>
          .
          <source>Twelfth International Conference on Membrane Computing (CMC12)</source>
          (
          <year>2011</year>
          ) In Print.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>I.</given-names>
            <surname>Petreska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kefalas</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Georghe: Informal verication by visualisation of statebased formal models of bio-agents</article-title>
          .
          <source>Proceedings of the 6th Annual SEERC Doctoral Student Conference (DSC</source>
          <year>2011</year>
          )
          <article-title>(2011</article-title>
          ) In Print.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>P.</given-names>
            <surname>Kefalas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Eleftherakis</surname>
          </string-name>
          , E.Kehris:
          <article-title>Communicating x-machines: A practical approach for formal and modular specication of large systems</article-title>
          .
          <source>Information and Software Technology</source>
          <volume>45</volume>
          (
          <year>2003</year>
          )
          <fpage>269280</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Gh</surname>
          </string-name>
          .
          <source>Pun: Membrane Computing: An Introduction</source>
          . Springer, Berlin (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>I.</given-names>
            <surname>Stamatopoulou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kefalas</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Gheorghe: Operas: A framework for the formal modelling of multi-agent systems and its application to swarm-based systems</article-title>
          . In: ESAW, Berlin, Heidelberg, Springer-Verlag (
          <year>2007</year>
          )
          <fpage>158174</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>I.</given-names>
            <surname>Stamatopoulou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gheorghe</surname>
          </string-name>
          , P.Kefalas:
          <article-title>Modelling dynamic conguration of biology-inspired multi-agent systems with Communicating X-machines and Population P Systems</article-title>
          . Volume
          <volume>3365</volume>
          :
          <fpage>389</fpage>
          -
          <lpage>401</lpage>
          of LNCS. Springer-Verlag, Berlin (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>P.</given-names>
            <surname>Kefalas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Holcombe</surname>
          </string-name>
          , G.Eleftherakis,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Gheorge: A formal method for the development of agent based systems</article-title>
          . In V.Plekhanova, ed.:
          <source>Intelligent Agent Software Engineering</source>
          , Idea Group Publishing Co.
          <article-title>(</article-title>
          <year>2003</year>
          )
          <fpage>6898</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>F.</given-names>
            <surname>Ipate</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Holcombe: Specication and testing using generalised machines: a presentation and a case study</article-title>
          ,
          <source>Software Testing, Verication and Reliability</source>
          (
          <year>1998</year>
          )
          <fpage>6181</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. U.Wilensky:
          <article-title>NetLogo Segregation model</article-title>
          .
          <article-title>Center for Connected Learning</article-title>
          and
          <string-name>
            <surname>Computer-Based</surname>
            <given-names>Modeling</given-names>
          </string-name>
          , Northwestern Univ., Evanston, IL. (
          <year>1997</year>
          ) http://ccl.northwestern.edu/netlogo/models/Segregation.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. U.Wilensky: NetLogo.
          <article-title>Center for Connected Learning</article-title>
          and
          <string-name>
            <surname>Computer-Based</surname>
            <given-names>Modeling</given-names>
          </string-name>
          , Northwestern Univ., Evanston, IL. (
          <year>1999</year>
          ) http://ccl.northwestern.edu/netlogo/.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>M.Pogson</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Smallwood</surname>
            , E.Qwarnstrom,
            <given-names>M.</given-names>
          </string-name>
          <article-title>Holcombe: Formal agent-based modelling of intracellular chemical interactions</article-title>
          .
          <source>Biosystems</source>
          <volume>85</volume>
          (
          <year>2006</year>
          )
          <fpage>3745</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>R.</given-names>
            <surname>Smallwood</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Holcombe</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          <article-title>Walker: Development and validation of computational models of cellular interaction</article-title>
          .
          <source>Journal of Molecular Histology</source>
          <volume>35</volume>
          (
          <year>2004</year>
          )
          <fpage>659665</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>D.E.Michael</surname>
            ,
            <given-names>G.G.</given-names>
          </string-name>
          <string-name>
            <surname>William</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Yoshio</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <article-title>Notkin: Dynamically discovering pointerbased program invariants</article-title>
          .
          <source>Technical Report UW-CSE-99-11-02</source>
          , University of Washington Department of Computer Science and Engineering, Seattle,
          <source>WA (November 1999) Revised March 17</source>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. G.J.Holzmann:
          <article-title>The model checker spin</article-title>
          .
          <source>IEEE IFans. on Software Engineering</source>
          (
          <year>1997</year>
          )
          <fpage>279295</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>M.Kwiatkowska</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <string-name>
            <surname>Norman</surname>
          </string-name>
          , D.Parker: Prism:
          <article-title>Probabilistic symbolic model checker</article-title>
          .
          <source>In Proc. PAPM/PROBMIV'01 Tools Session</source>
          (
          <year>2001</year>
          )
          <fpage>712</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>K.L.McMillan: Symbolic Model Checking</surname>
          </string-name>
          . Kluwer Academic Publishers, Englewood
          <string-name>
            <surname>Clis</surname>
          </string-name>
          (
          <year>1993</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>