Adaptive algorithms for the dynamic distribution and parallel execution of agent-based models

Matthias Scheutz, Paul Schermerhorn
<span title="">2006</span> <i title="Elsevier BV"> <a target="_blank" rel="noopener" href="https://fatcat.wiki/container/rwjg7tprafhufajayuvxj2q4n4" style="color: black;">Journal of Parallel and Distributed Computing</a> </i> &nbsp;
We propose a framework for defining agent-based models (ABMs) and two algorithms for the automatic parallelization of agent-based models, a general version P-ABM G for all ABMs definable in the framework and a more specific variant P-ABM S for "spatial ABMs" targeted at SWARM and ANT-based models, where the additional spatial information can be utilized to obtain performance improvements. Both algorithms can automatically distribute ABMs over multiple CPUs and dynamically adjust the degree of
more &raquo; ... rallelization based on available computational resources throughout the simulation runs. We also describe a first implementation of P-ABM S in our SWAGES environment and report both results from simulations with simple SWARM agents that provide a lower bound for the performance gains achievable by the algorithm and results from simulations with more complex deliberative agents, which need to synchronize their state after each update cycle. Even in the latter case, we show that in some conditions the algorithm is able to achieve close-to-maximum performance gains. Agent-based models (ABMs) and their simulations have been widely employed in the fields of complex systems, artificial life, genetic programming and genetic evolution, social studies, and others to study emergent group behaviors in swarms [1] [2] [3] [4] [5] , bacterial chemotaxis signaling pathways [6, 7] , population ecology [8-10], social and economic systems [11] [12] [13] , and many more. 1 While most ABMs are intrinsically parallel in that they implicitly decompose the overall complex system behavior into tractable behaviors of individuals and their interactions, most simulation environments for ABMs are sequential: they run on a single CPU and do not support the distribution of the ABM over multiple CPUs (even though they might support the scheduling of sequences of ABM simulations). And the few existing simulation environments that support the parallelization of ABMs, require the designer of the ABM to make provisions in the code that will allow for the distribution of the simulation. As a result, it is very difficult for nonexperts (i.e., scientists with no background in parallel programming) to utilize the potential parallelism present in many ABMs for running parts of their models in parallel. Moreover, such parallelizations are typically not generic, but are tailored Email address: {mscheutz,pscherm1}@nd.edu (Matthias Scheutz and Paul Schermerhorn). 1 Agent-based models-sometimes also called "individual-based" models-are often used to simulate the behavior of complex real-world systems, when possible state changes of individual entities are known and can be encoded in rules, while no such knowledge exists for global world states (e.g., the state given by the environment and all its agents). Agent-based modeling has been applied in many diverse fields (as mentioned in the introduction). Consequently, different kinds of formalisms and frameworks have been developed to capture this diversity (e.g., some models are essentially physicsbased, while others operate on a mere social level). Common to all of them is the idea that individuals (in groups of entities) are modeled as such (e.g., molecules in a cell, ants in a colony, strategies in a tournament, etc.), rather than as relations among global state variables abstracting over the individuals (although the latter typically can be recovered from the individual's interactions). Hence, simulations of these models could all potentially benefit from parallelizing the model at its natural seams: the individuals. Specifically, it would be beneficial for ABM research if ABM simulations could be distributed over a set of CPUs such that the overall execution time of a simulation run can be reduced, ideally by a linear factor in the number of employed CPUs. Moreover, it would be particularly helpful if ABM researchers did not have to worry about the parallelization themselves, but rather could defer it to simulation software, which adaptively distributes an ABM over CPUs as they become available. In this paper, we will propose algorithms that can accomplish this task. A prerequisite for the definition of any such algorithm is a formal description of the notion of "agent-based model", for otherwise it is only possible to define ad-hoc algorithms for specific model instances. Clearly, the generality of the description will limit the applicability of the algorithm. Hence, it is important to take care in laying out the formal description framework to be as inclusive as possible, while at the same time not sacrificing the potential of the algorithm to save time (via parallelization). We will attempt this balancing act in the rest of this section by continuous metric space (e.g., with the Euclidean norm). Such models allow for the simulation of interactions among entities based on a notion of distance, which is crucial for understanding the behavior of many biological systems and organizations of agents in physical spaces (e.g., insect swarms, flocks of birds, schools of fish, etc.). In a sense, any agent-based model can be viewed as a "spatial agentbased model" (S-ABM)-if no notion of space is defined in an ABM M, it can be trivially viewed as an S-ABM with only one location, which all entities occupy. Hence, we start with a general characterization of (metric) S-ABMs, including the main constituents: (1) a spatial environment, (2) a set of global (or environmental) states, (3) a set of locations in the environment for which global states can be updated, (4) a set of entity types (of all entities defined in the model), (5) a set of initial conditions (some/all of which are to be investigated in simulation runs of the model), and (5) a set of conditions that single out final configurations (i.e., configurations that mark important states of the model, typically used for terminating simulations, such as equilibrium states or states without any entities left, etc.). 4 Definition 1 (Spatial Agent-Based Model) A spatial agent-based model M = Env M , GS M , Loc M , Ent M , Init M ,Cond M consists of an n-dimensional bounded or unbounded metric space Env M , a set of global environmental states GS M , a set of locations in the environment together with their respective update functions Loc M = { L,U L |L ∈ P (Env M ,U L : P (Env M × GS M → GS M )}, 5 a set of entity types Ent M 6 , a set of initial configurations Init M , and a set of conditions for final in every round of a tournament. 4 The qualifier "metric" was chosen simply because we are not aware of any non-metric spatial ABMs, but nothing theoretical hinges on it. We will focus on n-dimensional continuous Euclidean spaces (discrete Euclidean spaces are then just a special case). 5 We use "P (X)" to denote the power set of a set X. 6 We prefer the term "entity" to refer to the computational representation of some real-6 configurations Cond M . Typically, Cond M will consist of logial formulas (e.g., in first order logic) that describe properties of configurations. 7 Each configuration in the set of initial configurations is C = {E|τ(E) ∈ Ent M } ∪ f irst Loc M , i.e., a set of instantiated entities E (whose types τ(E) are in Ent M together with all the defined locations, i..e, the first projections of Loc M ). 8 We will use C f g M to denote the set of all possible configurations determined by the model M . If we assume discrete environments with finitely many locations and entity types with only finitely many instances, then the set of configurations will also be finite. Note that locations have their own update functions directly associated to allow for local and global changes of environmental states (e.g., global and/or local temperature, updates pheromone concentration, etc.). 9 world entity within an ABM over the more common term "agent" given the ambiguities in the literature associated with the term "agent", which we would like to avoid (e.g., any computational entity within an agent-based simulation is called "agent" even though it might not even have sensors or actuators, which are requirements for many notions of agent, e.g., as in an "autonomous computational entity with sensors and actuators that is Deliberative(agent, checkpointList, obstList) if distance(agent, agent.planTarget) > gatheringDist then agent.memory := updateMemory(oldLoc, agent, agent.memory) rePlan := f alse for all E ∈ obstList do f ound := f alse for all M ∈ agent.memory do if distance(E, M) < ε then f ound := true end if end for if f ound == f alse then insert(E, agent.memory) rePlan := true
<span class="external-identifiers"> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.1016/j.jpdc.2005.09.004">doi:10.1016/j.jpdc.2005.09.004</a> <a target="_blank" rel="external noopener" href="https://fatcat.wiki/release/qrdcnofwyrbl7nmmyvgu2h3oje">fatcat:qrdcnofwyrbl7nmmyvgu2h3oje</a> </span>
<a target="_blank" rel="noopener" href="https://web.archive.org/web/20170809142645/https://hrilab.tufts.edu/publications/scheutzschermerhorn06pardist.pdf" title="fulltext PDF download" data-goatcounter-click="serp-fulltext" data-goatcounter-title="serp-fulltext"> <button class="ui simple right pointing dropdown compact black labeled icon button serp-button"> <i class="icon ia-icon"></i> Web Archive [PDF] <div class="menu fulltext-thumbnail"> <img src="https://blobs.fatcat.wiki/thumbnail/pdf/b6/cd/b6cdd28125afe63a5f3a1e0b4addf5cfafc86d51.180px.jpg" alt="fulltext thumbnail" loading="lazy"> </div> </button> </a> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.1016/j.jpdc.2005.09.004"> <button class="ui left aligned compact blue labeled icon button serp-button"> <i class="external alternate icon"></i> elsevier.com </button> </a>