2010-03-22 851-0585-04L – Modelling and Simulating Social Systems with MATLAB Lesson 5 – Introduction to agent-based simulations A. Johansson & W. Yu ©

Slides:



Advertisements
Similar presentations
New Mexico Computer Science for All
Advertisements

Evolving Flocking Simulation and Robotics Dan Sayers iotic.com.
Flocking Behaviors Presented by Jyh-Ming Lien. Flocking System What is flocking system? – A system that simulates behaviors of accumulative objects (e.g.
Better Group Behaviors in Complex Environments using Global Roadmaps O. Burchan Bayazit, Jyh-Ming Lien and Nancy M. Amato Presented by Mohammad Irfan Rafiq.
OBJECT-ORIENTED THINKING CHAPTER Topics  The Object-Oriented Metaphor  Object-Oriented Flocks of Birds –Boids by Craig W. Reynolds  Modularity.
Distributed Load Balancing for Parallel Agent-based Simulations Biagio Cosenza*, Gennaro Cordasco, Rosario De Chiara, Vittorio Scarano ISISLab, Dipartimento.
Florian Klein Flocking Cooperation with Limited Communication in Mobile Networks.
Swarm algorithms COMP308. Swarming – The Definition aggregation of similar animals, generally cruising in the same direction Termites swarm to build colonies.
Particle Swarm Optimization
CITS4403 Computational Modelling Agent Based Models.
Direction Election in Flocking Swarms Ohad Ben-Shahar, Shlomi Dolev Andrey Dolgin, Michael Segal Ben-Gurion University of the Negev.
Minority Games A Complex Systems Project. Going to a concert… But which night to pick? Friday or Saturday? You want to go on the night with the least.
John S Gero Agents – Agent Simulations AGENT-BASED SIMULATIONS.
SteerBench: a benchmark suite for evaluating steering behaviors Authors: Singh, Kapadia, Faloutsos, Reinman Presented by: Jessica Siewert.
Agent Based Modeling (ABM)
Real-time Crowd Movement On Large Scale Terrains Speaker: Alvin Date:4/26/2004From:TPCG03.
Collective Animal Behavior Ariana Strandburg-Peshkin.
Emergent Phenomena & Human Social Systems NIL KILICAY.
Towards A Multi-Agent System for Network Decision Analysis Jan Dijkstra.
Evolutionary Robotics Evolutionary Robotics for Swarms.
Department of Computer Science What is NetLogo UH-DMML  Multi-agent programmable modeling environment  Well suited for modeling complex systems evolving.
L/O/G/O Ant Colony Optimization M1 : Cecile Chu.
Agent Based Modeling and Simulation
Yingcai Xiao Artificial Intelligence in Game Development Yingcai Xiao.
Introduction to Discrete Event Simulation Customer population Service system Served customers Waiting line Priority rule Service facilities Figure C.1.
UNDERSTANDING THE BRAIN’S EMERGENT PROPERTIES Don Miner, Marc Pickett, and Marie desJardins Multi-Agent Planning & Learning Lab University of Maryland,
Spatial Dynamical Modelling with TerraME Lectures 4: Agent-based modelling Gilberto Câmara.
Biology: flocking, herding & schooling Day 5 COLQ 201 Multiagent modeling Harry Howard Tulane University.
Zhiyong Wang In cooperation with Sisi Zlatanova
Dr Tina Balke Dr Thomas Centre for Research in Social.
Flow Fields Hao Li and Howard Hamilton. Motivation for Flow Fields Multiple AI algorithms in a computer game can produce conflicting results. The AI must.
UMBC  CSEE   1 Autonomous Agents and Self Organization.
PSY105 Neural Networks 1/5 1. “Patterns emerge”. π.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Event Driven Programming, The.
Stigmergy: emergent cooperation
1 IE 607 Heuristic Optimization Particle Swarm Optimization.
11.3: Movement of Ants (plus more Matlab, plus Artificial Life)
Exploring Complex Systems through Games and Computer Models Santa Fe Institute – Project GUTS
Modeling Complex Dynamic Systems with StarLogo in the Supercomputing Challenge
L – Modelling and Simulating Social Systems with MATLAB Lesson 7 – Continuous simulations Wenjian Yu © ETH Zürich |
Controlling the Behavior of Swarm Systems Zachary Kurtz CMSC 601, 5/4/
Neural Networks and Machine Learning Applications CSC 563 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Prof. Lars-Erik Cederman ETH - Center for Comparative and International Studies (CIS) Seilergraben 49, Room G.2, Nils.
Introduction of Intelligent Agents
L – Modelling and Simulating Social Systems with MATLAB © ETH Zürich | Lesson 3 – Dynamical Systems Anders Johansson and Wenjian.
Changing the Rules of the Game Dr. Marco A. Janssen Department of Spatial Economics.
An Agent Epidemic Model Toward a general model. Objectives n An epidemic is any attribute that is passed from one person to others in society è disease,
B OIDS, D ROIDS, & N OIDS : D ESCRIPTION AND I MPLICATIONS OF AN I NTEGRATIVE R ESEARCH P ARADIGM ON M ACROCOGNITION Steve W.J. Kozlowski Georgia T. Chao.
Iteration. Iteration: Review  If you wanted to display all the numbers from 1 to 1000, you wouldn’t want to do this, would you? Start display 1 display.
Prof. Dr. Lars-Erik Cederman ETH - Center for Comparative and International Studies (CIS) Seilergraben 49, Room G.2,
Dip. Di Informatica Sistemi e Produzione Università di Roma Tor Vergata E. Casalicchio, E.Galli, S.Tucci CRESCO SPIII.5 Project status Università.
2006 IEEE International Conference On Networking, Sensing and Control Empirical Study on the Effects of Synthetic Social Structures on Teams of Autonomous.
Topics in Bioinformatics Project 7 Kelsic ED, Zhao J, Vetsigian K, Kishony R. Counteraction of antibiotic production and degradation stabilizes microbial.
Students: Yossi Turgeman Avi Deri Self-Stabilizing and Efficient Robust Uncertainty Management Instructor: Prof Michel Segal.
What we started with To develop an application that facilitates user to draw interactive graphs (e.g. Flowcharts,class diagrams, UML diagrams etc ). Interactive.
Particle Swarm Optimization (PSO) Algorithm. Swarming – The Definition aggregation of similar animals, generally cruising in the same directionaggregation.
Done by Fazlun Satya Saradhi. INTRODUCTION The main concept is to use different types of agent models which would help create a better dynamic and adaptive.
Modelling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB
Systems Analysis and Design in a Changing World, 6th Edition
Modelling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB
Modelling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB
Systems Analysis and Design in a Changing World, 6th Edition
Computer-Mediated Communication
Runs, Parameter Sets, Outputs and Projects
Sugarscape: An Application of Agent Based Modeling Andy Menke TJHSST Computer Systems Lab Abstract: Computer scientists have long tried to simulate.
Hiroki Sayama NECSI Summer School 2008 Week 2: Complex Systems Modeling and Networks Agent-Based Models Hiroki Sayama
Introduction to RePast and Tutorial I
Presentation transcript:

L – Modelling and Simulating Social Systems with MATLAB Lesson 5 – Introduction to agent-based simulations A. Johansson & W. Yu © ETH Zürich |

A. Johansson & W. Yu /  Send us an abstract of your project.  Don't re-invent the wheel but try to build upon existing models.  Start simple and extend functionality.  Look at project reports from previous semesters. Projects 2

A. Johansson & W. Yu / 3 Lesson 5 - Contents  Swarm intelligence  Human cooperation and coordination  How to develop a multi-agent simulator

A. Johansson & W. Yu / Swarm Intelligence 4  Decentralized control  Interaction and learning  Self-organization

A. Johansson & W. Yu / Boids (Reynolds,1986) 5

A. Johansson & W. Yu / More information: 6 Separation: steer to avoid crowding local flockmates Alignment: steer towards the average heading of local flockmates Cohesion: steer to move toward the average position of local flockmates

A. Johansson & W. Yu / Human Cooperation  Prisoner’s dilemma 7 15,1520,0 0,2019,19

A. Johansson & W. Yu / The Evolution of Cooperation (Axelrod,1984)  Tit for tat  Shadow of the future 8

A. Johansson & W. Yu / Coordination 1,10,0 1,1 9

A. Johansson & W. Yu / Learning  Imitation  Reinforcement  Best reply 10

A. Johansson & W. Yu / From Factors to Actors (Macy,2002)  Agents are autonomous  Agents are interdependent  Agents follow simple rules  Agents are adaptive and backward-looking 11

A. Johansson & W. Yu / 12 Programming a simulator  Agent based simulations  The models simulate the simultaneous operations of multiple agents, in an attempt to re-create and predict the actions of complex phenomena.  Agents can be pedestrians, animals, customers, internet users, etc…

A. Johansson & W. Yu / 13 Programming a simulator  Agent based simulations Time line Characterized by a state (or states) (location, dead/alive, color, level of excitation) Time t Time t + dt State update According to set of behavioral rules New state T1 T2 dt

A. Johansson & W. Yu / 14 Programming a simulator  Agent based simulations Characterized by a state (location, dead/alive, level of excitation) Time t Time t + dt State update According to set of behavioral rules, including neighborhood New state Time line T1 T2

A. Johansson & W. Yu / 15 Programming a simulator  Programming an agent based simulator often goes in five steps  Initialization -Initial state; parameters; environment  Time loop -Processing each time steps  Agents loop -Processing each agents  Update -Updating agent i at time t  Save data -For further analysis Initialization Time loop end Save data Agents loop end Update state

A. Johansson & W. Yu / 16 Programming a simulator  Step 1: Defining the initial state & parameters % Initial state t 0 =0;%begining of the time line dt=1 ;%time step T=100; %number of time steps %Initial state of the agents State1 = [ ]; State2 = [ ]; etc…

A. Johansson & W. Yu / 17 Programming a simulator  Step 1: Defining the initial state & parameters % Initial state t 0 =0;%begining of the time line dt=1 ;%time step T=100; %number of time steps %Initial state of the agents State1 = zeros(1,50); State2 = rand(1,50);

A. Johansson & W. Yu / 18 Programming a simulator  Step 2: Covering each time step % time loop For t=t 0 :dt:T What happen at each time step? - Update environment - Update agents end

A. Johansson & W. Yu / 19 Programming a simulator  Step 3: Covering each agent % agent loop For i=1:length(States) What happen for each agent? end

A. Johansson & W. Yu / 20 Programming a simulator  Step 4: Updating agent i at time t % update % Each agent has 60% chance to switch to state 1 randomValue=rand(); if (randomValue<0.6) State(i)=1; else State(i)=0; end Use sub-functions for better organization!!

A. Johansson & W. Yu / 21 Programming a simulator  Step 4: Updating agent i at time t % update % Each agent has ‘proba’ chance to switch to state 1 randomValue=rand(); if (randomValue<proba) State(i)=1; else State(i)=0; end Define parameters in the first part!!

A. Johansson & W. Yu / 22 Programming a simulator  Step 4: Updating agent i at time t % Initial state t 0 =0;%begining of the time line dt=1 ;%time step T=100; %number of time steps proba=0.6;%probability to switch state Define parameters in the first part!!

A. Johansson & W. Yu / 23 Programming a simulator  Step 5: Final processing % Outputs and final processing propAlive = sum(states)/length(states); And return propAlive as the output of the simulation.

A. Johansson & W. Yu / >> p=simulation() p = 0.54 >> p=simulation() p = 0.72 Programming a simulator  Running simulation

A. Johansson & W. Yu / 25 Programming a simulator  Alternatively : a framework for the simulator % Running N simulations N=1000%number of simulation for n=1:N p(n)=simulation(); end Use a framework to run N successive simulation and store the result each time.

A. Johansson & W. Yu / 26 Programming a simulator  Alternatively : a framework for the simulator >> hist(p)