Agent-Based
Modelling and Simulations
Agent-Based Modelling
Agostino Poggi
Complex Systems
♦ Is a highly structured system, which shows structure with variations
♦ Its evolution is very sensitive to initial conditions or to small perturbations
Number of independent interacting components is large
There are multiple pathways by which the system can evolve
♦ Is difficult to understand and verify by design or function or both
♦ There are multiple interactions between many different components
♦ Constantly evolves over time
Numeric Simulation Limits
♦ Equational models have a large number of parameters
♦ Different theories must be used in biology, sociology, economy, ...
♦ Difficulty of the micro/macro transition and difficulty to represent different levels
♦ No representation of the behaviors, but only their overall result (e.g., number of individuals, amount of food, …)
♦ Doesn’t account for the emergence of spatial and time structures (e.g. fish schools or flocks of birds, columns of ants, ...)
Agent-Based Modelling
♦ Is an approach to modeling systems based on autonomous and interacting agents
♦ Is a bottom-up process
♦ Defines emergent phenomena from micro- behaviors
♦ Supports both optimization models and investigation of a dynamic process
♦ Succeeds where centralized planning and optimization models fail
Modeling Objectives (1/2)
♦ To understand some systems
In detail (quantitatively)
Qualitatively (the relationships between variables of interest)
To sharpen our intuitions
♦ To forecast or backcast some systems
Behaviors of participants in the system
System states (micro, meso or macro-level)
♦ To support intervention in some systems
To advise participants on their strategies
To advise owners (e.g., policy-makers) on their management
Modeling Objectives (2/2)
♦ To create some reality (i.e., models)
Black-Scholes options-pricing theory
Game theory for nuclear weapons doctrines
…
♦ To enable co-ordination between stakeholders (i.e., models as co-ordination artefacts)
Forecasting models in hedge funds
Corporate strategy modeling
Large-scale public policy modeling (national macro- economic models, models of climate change,
communicable disease models)
…
Agent Types
Agent Schools
♦ Artificial intelligence
Agents as autonomous entities solving problems
♦ Multi-agent systems
Distributed control of systems
♦ Agent-based modeling (and simulation)
Simulating (real world) phenomena
Agent Features
♦ Encapsulated
Clearly identifiable, with well-defined boundaries and interfaces
♦ Situated in a particular environment
Receives input through sensors and acts through effectors
♦ Capable of flexible action
Responds to changes and acts in anticipation
♦ Autonomous
Has control both over its internal state and over own
behavior, reacts to environmental change and proactively changes its behavior
♦ Designed to meet objectives
Attempts to fulfill a purpose, solve a problem, or achieve goals
Agent Model (1/2)
♦ An agent is a persistent thing which has some state and which interacts with other agents, mutually modifying each other’s states
♦ The components of an agent-based model are
A collection of agents and their states
Rules governing the interactions of the agents
Environment within which they live
♦ Interaction among agents is the central point of the simulation
Agent Model (2/2)
Environment
Agent Interaction
Behavior Ingredients
♦ Rule based
Nested if-then-else structures
♦ Multi criteria decision making
Options and weights
♦ Inference engines
Expert systems, facts (states) and decision heuristics
♦ Machine learning
Neural networks, deep learning, Bayesian statistics and pattern recognition
♦ Evolutionary computing
Find a optimal solution in large solution space (genetic algorithms)
Simulation
♦ Agent models are used as substitutes for another system
♦ Simulations mostly use virtual time
♦ Agents live a in a simulated environment
Social space
Virtual 2D/3D space
♦ Time and environment are controllable by the modeler
Time
♦ Simulations take place in discrete time
♦ Time progresses in ticks
♦ Between two ticks, everything is assumed to
happen in the same time, attempting to simulate the parallelism in real world
♦ As computers are serial processing machines, the order of iterations among agents is very important
Behavior Vs Goal Oriented Models
♦ Behavior-oriented modeling
Agents are described by modeling their behaviors
♦ Goal-oriented modeling
Agents are capable of planning and the modeler described their goal
♦ Choice of modeling strategy strongly depends on application context
Behavior Oriented Models
♦ Modeler describes agent status and dynamics
♦ Examples of formalisms are activity graphs, crisp/fuzzy rules, constraints, ...
♦ Reactions to perceptions/status changes are defined by the modeler
♦ Can easily accommodate reinforcement learning and evolutionary concepts
♦ Agents’ goal(s) are treated implicitly
♦ Very intuitive mapping with simple biological systems (e.g., insects)
Goal Oriented Models
♦ Modeler identifies goals of the agents
♦ Agents select a goal and execute actions as a consequence
♦ Reactions are not predefined, but goal dependent
♦ Explicit treatment of goals in the agent behavior, but
Execution of goal dependent actions can be error-prone
Leads to significantly more complex model (see Belief- Desire-Intention agent models)
Development & Use
Advantages
♦ Allows appropriate modeling capabilities in a number of important disciplines
Social science, biology, software development, …
♦ Allows to simulate systems that are particularly difficult to treat with traditional approaches
Emergent phenomena, models with variable structure
♦ Can afford more detail in models
More realism and micro-validity
♦ Provides an intuitive way of modeling
Facilitates communication with other fields and enables more researchers to use simulation
Applicability (1/2)
♦ When there are decisions and behaviors that can be well-defined
♦ When it is important that agents adapt and change their behaviors
♦ When it is important that agents have a dynamic relationship with other agents, and agent
relationships form, change and decay
♦ When it is important that agents form
organizations and when adaptation and learning are important at the organization level
Applicability (2/2)
♦ When it is important that agents have a spatial component to their behaviors and interactions
♦ When the past is no predictor of the future
because the processes of growth and changes are dynamic
♦ When scale-up to arbitrary levels is important
♦ When process structural change needs to be an endogenous result of the model, rather than an input to the model
Agent Simulation Vs Macro Simulation (1/3)
Agent Simulation Vs Macro Simulation (2/3)
Can deal with multi-agent
systems directly because real agent are represented by
simulated agent
Facilitates structural validation
Elegant treatment of variable structures
Allows to model adaptation and evolution
Easy to model heterogeneous space and population
Provides different levels of observation
Differential equations are a well understood,
established mathematical framework
Easy to document
Low number of
parameters, global input- output behavior
Agent Simulation Vs Macro Simulation (3/3)
Development of complex models can be very costly
Difficult to determine minimal model
Established formalism is missing, difficult to
document
Calibration problem, i.e., is difficult to find the best
parameter setting for a
model (given a structurally valid model)
Sensitivity problem, i.e., even small changes may have a large effect
Assumes homogeneous space and population
No representation of the
individual and its locality, i.e., no conditional behavior, no adaptive behavior, no flexible interaction
Can only observe the system as a whole, not its parts
Applications
Business and Organization Society and Culture Manufacturing operations Ancient civilizations
Supply chains Civil disobedience
Consumer markets Social determinant of terrorism Insurance industry Organizational networks
Economics Military
Artificial financial markets Command and control
Trade networks Force on force
Infrastructure Biology
Electric power markets Population dynamics
Transportation Ecological networks
Hydrogen infrastructure Animal group behavior
Crowds Cell behavior and sub-cell processes
Pedestrian movement Entertainment
Software (1/2) AgentSheets
AndroMeta AnyLogic Ascape Breve Cormas DEVS EcoLab FLAME JAS
LSD
MAML MATSim MASON MASS
MetaABM MIMOSE MobiDyc
Modelling4all NetLogo
RePast
Repast Simphony SimPack
SimPy SOARS StarLogo SugarScape Swarm
VisualBots Xholon
Software (2/2)