0% found this document useful (0 votes)
74 views42 pages

Agent-Based Simulation: Principles of Simulation and The Multi-Agent Approach

This document outlines an agent-based simulation course. The course goals are to learn about multi-agent simulation, simulation engineering concepts, and how to perform multi-agent simulation studies. The course structure includes lectures on principles of simulation and the multi-agent approach, as well as lab assignments in software like Golly and Crossroads. Students will be evaluated through lab assignments and a final exam testing their understanding of topics like swarm intelligence and cellular automata.

Uploaded by

tuanngthanh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views42 pages

Agent-Based Simulation: Principles of Simulation and The Multi-Agent Approach

This document outlines an agent-based simulation course. The course goals are to learn about multi-agent simulation, simulation engineering concepts, and how to perform multi-agent simulation studies. The course structure includes lectures on principles of simulation and the multi-agent approach, as well as lab assignments in software like Golly and Crossroads. Students will be evaluated through lab assignments and a final exam testing their understanding of topics like swarm intelligence and cellular automata.

Uploaded by

tuanngthanh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Agent-Based Simulation

Agent-Based Simulation
Principles of simulation and the Multi-Agent approach

Federico Pecora School of Science and Technology rebro University


[email protected]

Federico Pecora Agent-Based Simulation Part 1

1 / 37

Agent-Based Simulation

Outline

Goals and structure of this course

What is simulation?

The Multi-Agent approach

Principles of simulation design and implementation

Federico Pecora Agent-Based Simulation Part 1

2 / 37

Agent-Based Simulation Goals and structure of this course

Outline

Goals and structure of this course

What is simulation?

The Multi-Agent approach

Principles of simulation design and implementation

Federico Pecora Agent-Based Simulation Part 1

3 / 37

Agent-Based Simulation Goals and structure of this course

Goals of this course

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

Federico Pecora Agent-Based Simulation Part 1

4 / 37

Agent-Based Simulation Goals and structure of this course

Structure of the course

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

Federico Pecora Agent-Based Simulation Part 1

5 / 37

Agent-Based Simulation Goals and structure of this course

Evaluation criteria and exam


This course is composed of labs and theory For labs, you get either G (passed) or U (failed) For theory, you are graded in the system you are registered with
(U,3,4,5), (U,G,VG) or (F,E,D,C,B,A)

Theory is assessed through an exam


80 points in total 40 points required to pass the 80 points are mapped to grades as follows: (U,3,4,5) ([0, 39], [40, 54], [55, 70], [71, 80]) (U,G,VG) ([0, 39], [40, 69], [70, 80]) (F,E,D,C,B,A) ([0, 39], [40, 47], [48, 55], [56, 63], [64, 71], [72, 80])

Federico Pecora Agent-Based Simulation Part 1

6 / 37

Agent-Based Simulation Goals and structure of this course

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

Federico Pecora Agent-Based Simulation Part 1

7 / 37

Agent-Based Simulation Goals and structure of this course

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

You have 5 hours to complete the exam


during which I will come by to answer questions approximately one hour after start

Federico Pecora Agent-Based Simulation Part 1

8 / 37

Agent-Based Simulation Goals and structure of this course

Theoretical exam: whats important?

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!

Everything in the course is important for the exam


this course has a relatively limited scope, but in-depth knowledge is expected to pass the exam you are always absolutely free to come to my ofce if anything is unclear!

Federico Pecora Agent-Based Simulation Part 1

9 / 37

Agent-Based Simulation What is simulation?

Outline

Goals and structure of this course

What is simulation?

The Multi-Agent approach

Principles of simulation design and implementation

Federico Pecora Agent-Based Simulation Part 1

10 / 37

Agent-Based Simulation What is simulation?

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, . . .

Federico Pecora Agent-Based Simulation Part 1

11 / 37

Agent-Based Simulation What is simulation?

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, . . .

Federico Pecora Agent-Based Simulation Part 1

11 / 37

Agent-Based Simulation What is simulation?

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

Federico Pecora Agent-Based Simulation Part 1

12 / 37

Agent-Based Simulation What is simulation?

Model design, execution and analysis

Three sub-elds in simulation:


Model design

Model design Model execution

Model execution

Execution analysis

Execution analysis

Federico Pecora Agent-Based Simulation Part 1

13 / 37

Agent-Based Simulation What is simulation?

Types of simulation (1)


Simulation approaches can be categorized according to various criteria, e.g., dicrete vs. continuous time: Discrete event simulation Model: nite state machines, queues, petri nets, . . . ; Execution: read the queue of events and trigger new events as each event is processed; Applications: logic-test and fault-tree simulations. Continuous dynamic simulation Model: partial or ordinary differential equations; Execution: periodic numerical resolution of equations; Applications: ight simulators, electrical circuits.

Federico Pecora Agent-Based Simulation Part 1

14 / 37

Agent-Based Simulation What is simulation?

Types of simulation (2)


Simulation approaches can be categorized according to various criteria, e.g., stochastic vs. deterministic: Monte-Carlo simulation Model: can be almost anything; Execution: generate inputs randomly from the domain, and perform a deterministic computation on them; Applications: largely used in computational physics and engineering (e.g., designing heat shields and aerodynamic forms). Cellular automata Model: designing heat shields and aerodynamic for; Execution: periodic application of rules which determine state of a cell as a function of neighboring cells; Applications: see next lecture!

Federico Pecora Agent-Based Simulation Part 1

15 / 37

Agent-Based Simulation What is simulation?

Types of simulation (3)


Simulation approaches can be categorized according to various criteria, e.g., macrosimulation vs. microsimulation: Macrosimulation Model: complete system is modeled as one monolithic entity populations are averaged together and the model attempts to simulate changes in these averaged characteristics for the whole population; Execution: periodically update the state variables describing the system; Applications: naturally applies to systems that can be modeled centrally and and in which the dynamics are dominated by physical laws.

Federico Pecora Agent-Based Simulation Part 1

16 / 37

Agent-Based Simulation What is simulation?

Types of simulation (3)


Simulation approaches can be categorized according to various criteria, e.g., macrosimulation vs. microsimulation: Microsimulation Model: explicitly attempts to model specic behaviors of specic individuals; Execution: periodic interaction/communication between individuals; Applications: most appropriate for domains characterized by a high degree of localization and distribution and dominated by discrete decision. Multi-Agent simulation is a special form of Microsimulation

Federico Pecora Agent-Based Simulation Part 1

17 / 37

Agent-Based Simulation What is simulation?

Types of simulation (3)


Simulation approaches can be categorized according to various criteria, e.g., macrosimulation vs. microsimulation: Microsimulation Model: explicitly attempts to model specic behaviors of specic individuals; Execution: periodic interaction/communication between individuals; Applications: most appropriate for domains characterized by a high degree of localization and distribution and dominated by discrete decision. Multi-Agent simulation is a special form of Microsimulation

Federico Pecora Agent-Based Simulation Part 1

17 / 37

Agent-Based Simulation What is simulation?

Time advance function

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

Federico Pecora Agent-Based Simulation Part 1

18 / 37

Agent-Based Simulation What is simulation?

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)

Federico Pecora Agent-Based Simulation Part 1

19 / 37

Agent-Based Simulation The Multi-Agent approach

Outline

Goals and structure of this course

What is simulation?

The Multi-Agent approach

Principles of simulation design and implementation

Federico Pecora Agent-Based Simulation Part 1

20 / 37

Agent-Based Simulation The Multi-Agent approach

Some examples
Biological system simulation Cellular automata Ant colony optimization

Physics simulation . . . the real thing Flocking/Herding

Federico Pecora Agent-Based Simulation Part 1

21 / 37

Agent-Based Simulation The Multi-Agent approach

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

Federico Pecora Agent-Based Simulation Part 1

22 / 37

Agent-Based Simulation The Multi-Agent approach

Why Multi-Agent simulation?


A paradigm that allows appropriate modeling capabilities in a number of imporant disciplines
Social science, Biology Modeling socio-technical systems and test environments for agent-based software

Allows to simulate systems that are particularly difcult 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 elds and enables more researchers to use simulation

Federico Pecora Agent-Based Simulation Part 1

23 / 37

Agent-Based Simulation The Multi-Agent approach

Charateristics of Multi-Agent simulation


Agents are autonomous entities that react to environmental change and proactively change their behavior Typically one agent Perception and action is local Variable structure models
models that entail in their description the possibility to change their own structure, i.e., their constitutive components as well as the relations that exist among them

Flexible interactions between agents Non-linear feedback loops Adaptive agents

Federico Pecora Agent-Based Simulation Part 1

24 / 37

Agent-Based Simulation The Multi-Agent approach

Simulating Multi-Agent Systems

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

= time and environment are controllable by the modeler

Federico Pecora Agent-Based Simulation Part 1

25 / 37

Agent-Based Simulation The Multi-Agent approach

Applications of Multi-Agent simulation


Biological systems: active and heterogeneous entities exert inuences on their local environment reacting on local stimuli Trafc simulation: microscopic models represent sophisticated intelligent entities (simulated drivers) Social science simulation: articial societies are created to test scientic hypotheses (e.g., gossip) Industrial simulation: there are non-articial (e.g., human) agents involved, or where parts of the system contribute to an overall difcult to model emerging behavior Simulation for entertainment: large multitudes of agents (e.g., animals, armies, . . . ) move in 3D space (see Lord of the Rings) Testbeds: for complex control systems
Federico Pecora Agent-Based Simulation Part 1 26 / 37

Agent-Based Simulation The Multi-Agent approach

Multi-Agent simulation vs. Macrosimulation


Pitfalls of Macrosimulation Assumes homogeneous space and population No representation of the individual and its locality, i.e., no conditional behavior, no adaptive behavior, no exible interaction Can only observe the system as a whole, not its parts Advantages of Macrosimulation Differential equations: a well understood, established mathematical framework Easy to document Low number of parameters, global input-output behaviour Simulation experiments can be very fast
Federico Pecora Agent-Based Simulation Part 1 27 / 37

Agent-Based Simulation The Multi-Agent approach

Multi-Agent simulation vs. Macrosimulation

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

Federico Pecora Agent-Based Simulation Part 1

28 / 37

Agent-Based Simulation The Multi-Agent approach

Multi-Agent simulation vs. Macrosimulation

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

Federico Pecora Agent-Based Simulation Part 1

29 / 37

Agent-Based Simulation The Multi-Agent approach

Bevaior- vs. Goal-oriented agent models

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

Federico Pecora Agent-Based Simulation Part 1

30 / 37

Agent-Based Simulation The Multi-Agent approach

Bevaior- vs. Goal-oriented agent models

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

Federico Pecora Agent-Based Simulation Part 1

30 / 37

Agent-Based Simulation The Multi-Agent approach

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)

Federico Pecora Agent-Based Simulation Part 1

31 / 37

Agent-Based Simulation The Multi-Agent approach

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)

We do not deal with goal-oriented models in this course

Federico Pecora Agent-Based Simulation Part 1

32 / 37

Agent-Based Simulation Principles of simulation design and implementation

Outline

Goals and structure of this course

What is simulation?

The Multi-Agent approach

Principles of simulation design and implementation

Federico Pecora Agent-Based Simulation Part 1

33 / 37

Agent-Based Simulation Principles of simulation design and implementation

Main steps in a simulation study [Klgl, 2004]

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

Federico Pecora Agent-Based Simulation Part 1

34 / 37

Agent-Based Simulation Principles of simulation design and implementation

Model validation and verication


Validation: crucial for guaranteeing that output of simulation will say something meaningful! Verication: making sure the model is correctly translated from one representation to another (e.g., from concept to specication)
Original system

Validation Verification Concept model

Validation Specified model Verification

Validation Implemented model Verification

Validation Simulation output data

Validation and verication between all steps!


Federico Pecora Agent-Based Simulation Part 1 35 / 37

Agent-Based Simulation Principles of simulation design and implementation

Model validation and verication


Validation: crucial for guaranteeing that output of simulation will say something meaningful! Verication: making sure the model is correctly translated from one representation to another (e.g., from concept to specication)
Original system

Validation Verification Concept model

Validation Specified model Verification

Validation Implemented model Verification

Validation Simulation output data

Validation and verication between all steps!


Federico Pecora Agent-Based Simulation Part 1 35 / 37

Agent-Based Simulation Principles of simulation design and implementation

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

Federico Pecora Agent-Based Simulation Part 1

36 / 37

Agent-Based Simulation Principles of simulation design and implementation

Principles of simulation and the Multi-Agent approach

Thank you!

Federico Pecora Agent-Based Simulation Part 1

37 / 37

Agent-Based Simulation References

References
Klgl, F. (2004). Multi-Agent Simulation. Lecture at the Sixth European Agents Systems Summer School, Liverpool.

Federico Pecora Agent-Based Simulation Part 1

37 / 37

You might also like