Abms Modelisation Agent
Abms Modelisation Agent
This is mainly inspired from document: Proceedings of the 2014 Winter Simulation Conference
A. Tolk, S. Y. Diallo, I. O. Ryzhov, L. Yilmaz, S. Buckley, and J. A. Miller, eds.
ABSTRACT
1 INTRODUCTION
Agent-based simulation (ABS), or agent-based modeling (ABM), is a modeling and computational
framework for simulating dynamic processes that involve autonomous agents. An autonomous agent acts
on its own without external direction in response to situations the agent encounters during the simulation.
Modeling a population of autonomous agents, each with its own characteristics and behaviors, that
extensively interact is a defining feature of an ABS. Agent-based simulation is most commonly used to
model individual decision-making and social and organizational behavior (Bonabeau 2001). These
notions of behavior, decision-making, and interaction apply to modeling many kinds of system. An agent
is a general concept having broad applicability. Agents often represent people, or groups of people. Agent
relationships represent processes of social interaction (Gilbert and Troitzsch 2005). For example, an
individual’s daily activities are explicitly modeled in an ABS of infectious disease transmission to
understand transmission patterns arising from contact with other individuals. In a supply chain ABS,
agents are firms with decision-making behaviors about material sourcing and ordering, stocking,
shipping, capacity expansion, etc. In an ABS composed of artificial agents, collaborating robots search
the landscape and communicate their findings to collectively accomplish a task. The development of
agent-based modeling tools, the availability of micro-data on agent transactions and interactions, and
advances in computation have made possible a growing number of ABS applications across a variety of
domains and disciplines.
ABS has gained increasing attention over the past several years as evidenced by the increasing numbers
of articles appearing in modeling and applications journals, funded programs that call for agent-based
models incorporating elements of human and social behavior, the demand for ABS courses and
instructional programs, and the growing number of conferences that feature agent-based modeling, such
as the Winter Simulation Conference (WSC). Interest in ABS has steadily grown at the WSC since the
first ABS tutorial we presented in 2005 (Macal and North 2005). Agent-based modeling began as the
computational arm of the field of “artificial life,” which is concerned with the emergence of order in
nature, with the development of Swarm, the first agent-based modeling toolkit some 20 years ago (Macal
2009). Previous to that, the field of cellular automata gave the form, time and state advance mechanisms
to many of the original agent-based simulations. ABS originated and developed quite independently of
traditional Monte Carlo and discrete event simulation (DES). We refer the reader to previous papers on
other introductory topics in ABS not covered here, such as the history of ABS and the relationships of
ABS to other modeling and simulation techniques (Macal, North, and Samuelson 2013; Heath and Hill
2010; Macal and North 2010; Heath, Hill, and Ciarallo 2009).
Agent-based modeling is being applied to many areas, spanning human social, behavioral, cultural,
physical and biological systems. Applications range from modeling ancient civilizations that have been
gone for hundreds of years, to designing new markets for products that do not exist right now. Heath, Hill
and Ciarallo (2009) provide a review of agent-based modeling applications. Selected applications and
overview papers are listed in Table 1. All of the cited publications make the case for agent-based
modeling as the preferred modeling approach for the problems addressed. These authors argue that agent-
based modeling is used because only agent-based models can explicitly incorporate the complexity
arising from individual behaviors and interactions that exist in the real-world.
This tutorial provides an introduction to agent-based modeling and simulation. The goals are to show
that ABS is: Useful: Why ABS is an appropriate modeling approach for a large class of problems and has
advantages over conventional modeling approaches in many cases, Usable: How ABS is advancing to the
point of producing portable, extensible, and transferable software, with better integrated development
environments, and Used: How ABS applications are being developed to solve practical problems. This
tutorial is organized as follows. The first part of the paper (Sections 2 and 3) is on how to think about
ABS. The second part is on how to do ABS. Section 4 is a practical guide on how to get started in ABS,
and Section 5 considers when it is appropriate to use ABS.
2.2 Agents
There is not universal agreement on the precise definition of the term agent in the context of ABS. It is
the subject of much discussion and occasional debate. The issue is more than an academic one, as it often
surfaces when one makes a claim that their model is agent-based or when one is trying to discern whether
such claims made by others are valid. There are important implications of the term agent-based when
used to describe a model in terms of the model’s capabilities or potential capabilities that could be
attained through relatively minor modification. In the literature, descriptions of the term agent tend to
agree on more points than they disagree. Some modelers consider any type of independent component,
whether it be a software component or a model to be an agent (Bonabeau 2001). Some authors insist that
a component’s behavior must also be adaptive in order for it to be considered an agent. Casti (1997)
argues that agents should contain both base-level rules for behavior as well as a higher-level set of “rules
to change the rules.” The base-level rules provide responses to the environment, while the rules-to-
change-the-rules provide adaptation. Jennings’ (2000) computer science-based view of agent emphasizes
the essential agent characteristic of autonomous behavior.
For practical modeling purposes, we consider agents to have certain properties and attributes, as
follows (Figure 1):
Autonomy. An agent is autonomous and self-directed. An agent can function independently in its
environment and in its interactions with other agents, generally from a limited range of situations that are
of interest and that arise in the model. When we refer to an agent’s behavior, we refer to a general process
that links the information the agent senses from its environment and interactions to its decisions and
actions.
Modularity. Agents are modular or self-contained. An agent is an identifiable, discrete entity with a
set of characteristics or attributes, behaviors, and decision-making capability. The modularity requirement
implies that an agent has a boundary, and one can easily determine whether something (that is, an element
of the model’s state) is part of an agent or is not part of an agent, or is a characteristic shared among
agents.
Sociality. An agent is social, interacting with other agents. Common agent interaction protocols
include contention for space and collision avoidance, agent recognition, communication and information
exchange, influence, and other domain-or application-specific mechanisms.
Conditionality. An agent has a state that varies over time. Just as a system has a state consisting of the
collection of its state variables, an agent also has a state that represents its condition, defined by the
essential variables associated with its current situation. An agent’s state consists of a set or subset of its
attributes and its behaviors. The state of an agent-based model is the collective states of all the agents
along with the state of the environment. An agent’s behaviors are conditioned on its state. As such, the
richer the set of an agent’s possible states, the richer the set of behaviors that an agent can have.
Agents often have additional properties, which may or may not be considered as requisite properties
for agency. An agent may have explicit goals that drive its behavior, not necessarily objectives to
maximize as much as criteria against which to assess the effectiveness of its decision and actions. An
agent may have the ability to learn and adapt its behaviors based on its experiences. At the individual
level, learning and adaptation can be modeled as agent behaviors. Individual learning and adaptation
requires an agent to have memory as a dynamically updated attribute of the agent. At the population level,
adaptation can be modeled by aggregate changes in individual behaviors or by allowing agents to enter
and leave the population, with the more successful agents increasing their relative numbers in the
population over time.
Desktop ABS can be used to learn agent modeling, prototype basic agent behaviors, and perform
limited analyses. Desktop agent-based models can be simple, designed and developed independently in a
period of a few days by a single computer-literate modeler using tools learned in a few days or weeks.
Desktop agent modeling can be used to explore the potential of ABS with relatively minor time and
training investments, especially if one is already familiar with the tool.
Spreadsheets, such as Microsoft Excel, are in many ways the simplest approach to modeling. It is
easier to develop models with spreadsheets than with many of the other tools, but the resulting models
generally allow limited agent diversity, restrict agent behaviors, and have poor scalability compared to the
other approaches designed specifically for agent modeling. Agent-based modeling in spreadsheets
requires some macro-programming to be done in a language such as VBA (Visual Basic for
Applications), the macro programming language for Excel and other Microsoft Office applications.
Complex agent models have been developed entirely using spreadsheets. In previous WSC papers, we
described a spreadsheet implementation of a spatial agent-based shopper model (Macal and North 2007).
General-purpose desktop computational mathematics systems (CMS) with integrated development
environments (IDEs), such as MATLAB and Mathematica, can be used to develop agent models,
although the agent-specific functionality has to be written by the developer from scratch, as there are no
dedicated libraries or modules that focus on agent-based modeling. The basic requirement is knowledge
of how to program in a scripting language. CMS environments have rich mathematical functions and in
some cases, the tools even support symbolic processing and manipulation. If a CMS environment is
already familiar to a developer, this can be a good place to start agent-based modeling (Macal 2004).
Swarm was the first ABS software development environment, launched in 1994 at the Santa Fe
Institute. Swarm was originally written in Objective C and was later fitted with a Java interface. Special-
purpose agent tools, such as NetLogo, provide facilities for agent modeling (Wilensky 2014). The most
directly visible common trait shared by the various prototyping environments is that they are designed to
get first-time users started as quickly as possible. NetLogo uses a modified version of the Logo
programming language (Harvey 1997) and was originally developed to support ABS education at all
levels, but it can be used to develop a wide range of applications. Following the original Swarm
innovation, the Repast (REcursive Porous Agent Simulation Toolkit) toolkit was developed as a pure Java
implementation (North, Collier, and Vos 2006), and Repast Simphony (Repast S) is the latest version of
Repast, designed to provide visual point-and-click tools for agent model design, agent behavior
specification, model execution, and results examination. Repast Simphony 2.0 also includes ReLogo, a
new Logo-like interface for specifying agent models (Ozik et al. 2013). Reviews of Java-based agent
modeling toolkits are provided by Tobias and Hoffman (2004) and Nikolai and Madey (2009).
Scalable ABS software environments are now freely available and/or open source. These include
Repast (North, Collier and Vos, 2006; North et al. 2013), Swarm (Minar et al. 1996), NetLogo (Wilensky
2014) and MASON (GMU 2014) among others.
AnyLogic (XJ Technologies 2014, Borshchev 2013) and Simio (Simio 2014, Pegden 2014) are
leading commercial simulation environments that include agent-based modeling capabilities. AnyLogic
features “multimethod” modeling, i.e., has the capabilities to structure models that combine all three
simulation paradigms: agent-based, system dynamics, and discrete event. Simio is a simulation modeling
framework based on “intelligent objects” and supports a seamless use of multiple modeling paradigms
including event, process, object, and agent-based modeling.
As computational capabilities continue to advance in both hardware and software, new capabilities
are continuously being incorporated into the latest versions of ABS toolkits. The field is advancing
rapidly toward highly scalable, high productivity agent development environments that are easy to learn
and use.
Going through these steps positions one to start thinking about how to develop larger-scale and
serious agent-based models. The most important point to make is that there is no substitute for learning
about agent-based modeling than to get one’s hands dirty and actually build an agent-based model. This
is true even if the ultimate goal is not to become a full-time agent-based modeler. Steps 5 and 6 were
discussed in the previous section. Steps 1-4 are discussed below.
A background in computer programming is very helpful but not absolutely essential to get started
with agent-based modeling, as ABS environments may offer high-level languages that are relatively easy
to learn (e.g., NetLogo, ReLogo, et al.) or visual environments that simplify ABS specification (e.g.,
AnyLogic, Repast Simphony, et al.). However, developing an ABS with advanced capabilities (GIS,
database connectivity, etc.) often requires programming, typically in Java or another object-oriented
language such as C++. There is a natural relationship between ABS and object-oriented programming, as
agents may be regarded as objects with behaviors, i.e., intelligent objects (Macal and North 2007).
A single comprehensive source for reading all about ABM does not exist. Good introductions to
ABM include the web sites by Axelrod and Tesfatsion (2014), the ACE web site also by Tesfatsion
(2014), and the new web site by Railsback and Grimm (2013). The book by Epstein and Axtell (1996) is
often regarded as launching the field of social agent simulation in a sustained way. It includes simple, but
elegant, models of various social processes that are still being elaborated upon. The early paper by
Bonabeau (2001) remains as one of the most cited and readable papers on the motivations for ABS. The
book by Gilbert and Troitzsch (2005) is widely read and provides a highly readable overview of the field
including how to construct simple ABS. Our book (North and Macal 2007) is designed to provide a broad
non-technical introduction to ABS in terms of how to think about and do ABS as well as providing
terminology and language for becoming conversant in agent-based modeling.
There are several recurring issues that are often raised by newcomers to ABS including how agents
handle resource contention and allocation, how time is taken into account, etc. There are common
approaches in ABS to address these (Macal 2013) and other issues that are beyond introductory ABS.
The SIMSOC Archive (https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=simsoc) and SIMSOC listserv
are good places for information on various introductory and advanced ABS topics.
Good ABM applications are scattered throughout the literature across many disciplines. There is no
single publication source for ABM applications, but the online Journal of Artificial Societies and Social
Simulation (JASSS) has provided a consistent outlet for agent-based models for many years
(http://jasss.soc.surrey.ac.uk/JASSS.html).
Disciplines often produce their own overview publications on agent-based modeling specific to their
discipline. These can serve as valuable resources for understanding the value of using ABM in a
discipline and include key references for the domain. For example, disciplinary ABM overview and
survey papers include: marketing (Rand and Rust 2011), economics (Cristelli, Pietonero, and Zaccaria
2011), financial economics (LeBaron 2005), transportation (Bernhardt 2013), electric power markets
(Weidlich and Veit 2008), geographical information systems (GIS) (Brown et al. 2005), and many other
areas. Simple Google searches on “agent based model” or multi agent system model” yield many
application papers.
It can be very useful to visit the web sites for the ABM toolkits and download the software (NetLogo
or Repast, for example) or trial versions (AnyLogic, for example). Demonstration examples are provided
that give a good idea of how agent-based models are constructed and of the software’s capabilities.
Several conferences have a focus on agent-based modeling or tracks devoted to ABS. The annual
Winter Simulation Conference tends to have a full track of proceedings papers devoted to agent-based
simulation and applications. Our estimates are that about 20% of the papers in WSC are on agent-based
simulation. The annual MABS (Multi-Agent-Based Simulation) workshop, which is part of IAAMAS
(International Conference on Autonomous Agents and Multi-Agent Systems), focuses on agent-based
modeling “from the standpoint of the multiagent systems community of engineering and the
social/economic/organizational sciences” (https://sites.google.com/site/mabsworkshop/). The annual
Computational Social Science Society of the Americas (CSSSA) conference, formerly NAACSOS,
focuses on “Computational Social Science (CSS), a scientific discipline where computational methods
and simulation models of social dynamics are employed to offer new insights into social phenomena
beyond what is available with traditional social science methods”
(http://computationalsocialscience.org/csssa2013). SwarmFest (www.swarmfest2014.org) is a conference
devoted to agent-based modeling and simulation. Other conferences such as the annual INFORMS
meeting (https://www.informs.org/) and the annual MORSS (Military Operations Research Society
Symposium, http://www.mors.org/) often have significant numbers of presentations involving agent-
based models, and these number have steadily grown over the past 10 years.