Agent-Based Simulation: Principles of Simulation and The Multi-Agent Approach
Agent-Based Simulation: Principles of Simulation and The Multi-Agent Approach
Agent-Based Simulation
Principles of simulation and the Multi-Agent approach
1 / 37
Agent-Based Simulation
Outline
What is simulation?
2 / 37
Outline
What is simulation?
3 / 37
Learn about Multi-Agent simulation and its advantages Understand concepts of simulation engineering Learn how to perform a Multi-Agent simulation study Experience practical development in Multi-Agent simulation environments
4 / 37
Principles of simulation and the Multi-Agent approach Cellular Automata Lab assignment 1 (Golly) Behavioral Models for Coordinated Motion Lab assignment 2 (Crossroads) Lab assignment 3 (WildLife) Swarm Intelligence and Ant Colony Optimization Advanced topics, Review, Q&A
5 / 37
6 / 37
Labs
Labs are semi-supervised by Federico Pecora and Jonas Ullberg They all require programming
in Python or Perl for Cellular Automata in C++ for Behavioral Models for Coordinated Motion
All your programs will be developed within a pre-existing framework or API Labs are individual
you must submit all labs by email to teacher and TA within two weeks from the completion of your exam you are strongly advised to submit every assignment before the next one starts, and the last assignment before you take the exam
7 / 37
Theoretical exam
The theoretical exam is divided into four sections
the rst gives a maximum of 20 points: you must reply true/false to theoretical questions spanning the entire course the other three are relevant to selcted topics and require a more in-depth answer e.g., Swarm intelligence (20 points), Behavioral models (10 points), Cellular automata (20 points) questions can be composed of sub-questions
8 / 37
The theoretical exam is based on the lectures The material is the lecture slides, your notes, and any papers that the are handed out and/or referenced in the slides
. . . plus the experience you have gained from the labs!
9 / 37
Outline
What is simulation?
10 / 37
What is simulation?
We want to examine a part of the real world which is not accessible is difcult to experiment with evolves over loo long or too short time scales does not exist anymore/yet Modeling as a tool for understanding, verifying hypotheses, predicting, . . .
11 / 37
What is simulation?
We want to examine a part of the real world which is not accessible is difcult to experiment with evolves over loo long or too short time scales does not exist anymore/yet Modeling as a tool for understanding, verifying hypotheses, predicting, . . .
11 / 37
What is simulation?
System: an actual or theoretical system in which distinct entities interact Simulation: designing a model of a system, executing the model on a computer, and analyzing the execution output Model: a reproduction of the system at an appropriate level of granularity
12 / 37
Model execution
Execution analysis
Execution analysis
13 / 37
14 / 37
15 / 37
16 / 37
17 / 37
17 / 37
Whatever the model, execution consists in steping through time while updating the variables in the model There are many ways to step through time In continuous-time models (e.g., differential equations) time steps can be reduced idenitely In discrete-time models time is quantized somehow
leap through time using event scheduling employ small time increments using time slicing simulate the program on a massively parallel computer
18 / 37
Goal of simulation
Why use simulation? There are at least the following two reasons Prediction: model should produce quantitatively correct predictions depending on its input values Explanation: qualitatively signicant results are sufcient for understanding the reaction of the system to input values The goal of virtually all forms of simulation falls within this spectrum (including Multi-Agent simulation)
19 / 37
Outline
What is simulation?
20 / 37
Some examples
Biological system simulation Cellular automata Ant colony optimization
21 / 37
Multi-Agent simulation
Model concept based on Multi-Agent Systems Fundamental entities can sense the environment and act in the environment (environment = other agents + simulated world) Modeling a real Multi-Agent System as a Multi-Agent System in the model, i.e., using the concept of multi-agent systems in conceptualization, specication and implementation of the model Interaction among agents is the central point Simulation data: emerging behavior of the agents
22 / 37
Allows to simulate systems that are particularly difcult to treat with traditional approaches
Emergent phenomena, models with variable structure
23 / 37
24 / 37
Multi-Agent Models are used as substitutes for another system, the original multi-agent system Multi-Agent Simulations mostly use virtual time Simulated Multi-Agent Systems live a in a simulated environment
social space virtual 2D/3D space
25 / 37
Pitfalls of Multi-Agent simulation Development of complex models can be very costly Difcult to determine minimal model Established formalism is missing, difcult to document Calibration problem
nding the best parameter setting for a model (given a structurally valid model)
Sensitivity problem
even small changes may have a large effect
28 / 37
Advantages of Multi-Agent simulation Can deal with multi-agent systems directly: real agent 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
29 / 37
Agents in the study can be modeled in two ways 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 startegy strongly depends on application context
30 / 37
Agents in the study can be modeled in two ways 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 startegy strongly depends on application context
30 / 37
Behavior-oriented models
The modeler describes agent status and dynamics Example formalisms: activity graphs, crisp/fuzzy rules, constraints, . . . Reactions to perceptions/status changes are dened by the modeler Can easily accommodate Reinforcement Learning and Evolutionary Concepts The agents goal(s) are are treated implicitly Very intuitive mapping with simple biological systems (e.g., insects)
31 / 37
Goal-oriented models
The modeler identies goals of the agents Agents select a goal and execute actions as a consequence Reactions are not predened, but goal dependent Explicit treatment of goals in the agent behaviour, but
execution of goal-dependant actions can be error-prone leads to signicantly more complex model (see Belief-Desire-Intention agent simulations)
32 / 37
Outline
What is simulation?
33 / 37
1 2 3 4 5 6 7
Dening the question addressed by the model Conceptualizing the model Specifying the model Implementing the model [and the simulation environment] Calibrating, bug-xing Experimentation Analysis of the results
34 / 37
Potential pitfalls
Failure to have a well-dened set of objectives at the beginning of the simulation study Inappropriate level of model detail
need to identify a minimal model given the objective
Treat simulation simply as programming exercise Failure to collect appropriate data from the original system Inappropriate simulation software
this can account for 80% of development time!
Failure to account correctly for sources of randomness Inappropriate output data analysis
36 / 37
Thank you!
37 / 37
References
Klgl, F. (2004). Multi-Agent Simulation. Lecture at the Sixth European Agents Systems Summer School, Liverpool.
37 / 37