44
SOCIAL SIMULATION AND AGENT-BASED MODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Embed Size (px)

Citation preview

Page 1: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

SOCIAL SIMULATION AND

AGENT-BASED MODELLING

Dr Nick Malleson

Dr Alison Heppenstall

GEOG3150 Semseter 2

Lecture 3

Page 2: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Recap: Last Week

Last week; first forays into the wonderful world of programming.

Introduction to Netlogo

PracticalHow did everyone get on with the practical?

Page 3: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Recap: Why learn to code?

New computing curriculum for schools

Every child will learn to code

Code is becoming the “language of our world”

Computational thinkingProblem solving

See Year of Code (http://yearofcode.org/)

“Computational thinking teaches you how to tackle large problems by breaking them down into a sequence of smaller, more manageable problems. It allows you to tackle complex problems in efficient ways that operate at huge scale. It involves creating models of the real world with a suitable level of abstraction, and focus on the most pertinent aspects. It helps you go from specific solutions to general ones.”

Page 4: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Re-cap: Two weeks ago…

Geocomputation

“The Art and Science of Solving Complex Spatial Problems with Computers.”

What is a model?

A simplification of reality. Not a crystal ball

(Poster from GeoComputation conference, 1999)

Page 5: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Some ReadingsPapers – all offer excellent introductions to agent-based modelling

Crooks, A. and Heppenstall, A.J (2012) Introduction to Agent-based modelling. In

Heppenstall, A.J., Crooks, A.T., See, L.M. and Batty, M. (2012) Agent-based models of

Geographical Systems. Springer: Dordrecht.

Macal, C. M., & North, M. J. (2010). Tutorial on agent-based modelling and simulation.

Journal of Simulation, 4(3), 151–162. doi:10.1057/jos.2010.3

Bonabeau, E. (2002). Agent-based modeling: Methods and techniques for simulating human

systems. Proceedings of the National Academy of Sciences, 99(90003), 7280–7287.

doi:10.1073/pnas.082080899

O’Sullivan & Haklay (2000), Agent-based models and individualism: is the world agent-

based?, Environment and Planning A (32), 1409-25

Castle, C. J. E. and Crooks, A. T. (2006). Principles and concepts of agent-based modelling

for developing geospatial simulations. UCL Working Papers Series, Paper 110, Centre For

Advanced Spatial Analysis, University College London. Available online.

There is a long list of papers here:

http://mass.leeds.ac.uk/2013/02/13/an-excellent-abm-paper/

Textbook

Heppenstall, A.J., Crooks, A.T., See, L.M. and Batty, M. (2012) Agent-based models of

Geographical Systems. Springer: Dordrecht.

Page 6: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Other resourcesProf. Bruce Edmonds is one of the big names in agent-

based modelling. He has two videos that provide excellent

introductions to the methodology

A short one: http://www.youtube.com/watch?v=JANTkSa4hmA

A longer version from a conference presentation:

http://www.youtube.com/watch?v=9nEPxb2J73w

Page 7: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Lecture 3

(Social) Simulation

A brief history

Uses of Simulation

Introduction to ABM

Seminar: GIS and GeoComputation

Page 8: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

History of (Social) Simulation (1)

Simulation is a new idea – started 1960’s, but didn’t take off until 1990’s.

Club of Rome (1974)Simulations that predicted major environmental catastrophe

Results fatally flawed as reliant on major assumptions about many of the parameters

Early simulation attempts were predictive – NOT focused on explaining (socio-economic) processes.

Page 9: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

History (2)

One simulation method that has survived from the 1960s was microsimulation (Orcutt, 1975)

Take a population of individuals and apply some transition probability to them e.g. likelihood of moving house or having a baby etc

This is still used today for examining impacts of policy

E.g. What are the benefits to a population of building a new hospital/school/business park…?

Page 10: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

History (3)

No other simulation work until 1990’s and the emergence of Artificial Intelligence

Cellular Automata and Agent-based modelling

Why? (Raw materials)Computing power; data storage; data; technical know-how

What else? Acceptance that we need new tools!Aggregate versus individual

Scales of analysis

Interest in individual behaviour

DATA, DATA, DATA!!!

Page 11: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

In 2015…

One of the largest and fastest expanding areas of research is...

Agent-based modelling

Barely 20 years since the first application

Now hundreds of papers written every year.

Why?

Multi-disciplinarity

computing power

data storage

Data

technical know-how

This is the simulation approach that you will be learning about

and building over the remainder of this course.

Page 12: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Lecture 3

(Social) Simulation

A brief history

Uses of Simulation

Introduction to ABM

Seminar: GIS and GeoComputation

Page 13: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Uses of simulation (from Gilbert and Troitzsch, 2005)

UnderstandingExperimentation: Can we gain new insights and understanding of the world?

Test existing theories.

PredictionIf we can accurately replicate the dynamics of behaviour – we can predict what will happen in the future (?)

However, the further ahead we predict, the less accurate we become.

Page 14: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Uses of Simulation (2)

Substitute: If we can simulate the expertise of a doctor (expert systems), does this remove the need for the human expert?

TrainingCreation of programs/environments to train experts e.g. virtual car and flight simulators

Page 15: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Uses of Simulation (3)

Discovery and Formalisationdiscover new processes and knowledge about the phenomenon we are simulating through experimentation

Formalise this into new theories

Retire rich and smug.

Page 16: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Uses of Simulation (4)

Entertainment: MASSIVE (LoTR)

http://www.youtube.com/watch?v=ixJiHx7jGx8 (esp. 3:10, 3:55)

Page 17: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Social Simulation –Some definitions

Social science is the study of society and the relationships of individuals in a society.

Social simulation is the application of computational methods to study the processes/issues in social science.

Page 18: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Why is social simulation important to Geographers?

Page 19: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Tackling Societal Challenges (1)

Ageing population: Can the NHS cope with an increase of age related conditions? Where are the likely stress points going to be?

Energy: What policy can encourage home-owners to take up more green technologies?

Page 20: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Tackling Societal Challenges (2)

Economics: Can we simulate the UK economy and thus experiment with different financial policies?

Crisis: In the event of a large-scale incident (epidemics); how do we respond? Where do we deploy resources?

Page 21: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Lecture 3

(Social) Simulation

A brief history

Uses of Simulation

Introduction to ABM

Seminar: GIS and GeoComputation

Page 22: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Aggregate vs Individual Level

‘Traditional’ modelling methods work at an aggregate level, from the top-down

E.g. Regression, spatial interaction modelling, location-allocation, etc.

Page 23: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Aggregate vs. individual-level

Aggregate models work very well in some situationsHomogeneous individuals

Interactions not important

Very large systems (e.g. pressure-volume gas relationship)

But they miss some important things:Low-level dynamics, i.e. “smoothing out” (Batty, 2005)

Interactions and emergence (full lectures on these later)

Unsuitable for modelling complex systems

Page 24: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Aggregate vs. individual-level

Systems are driven by individuals(cars, people, ants, trees, whatever)

Not controlled by god

Bottom-up modellingAn alternative approach to modelling

Rather than controlling from the top, try to represent the individuals

Account for system behaviour directly

Picture by Wayan Vota(http://www.flickr.com/photos/dcmetroblogger/)

Page 25: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Agent-Based Modelling (ABM)

Autonomous, interacting agents

Represent individuals or groups

Situated in a virtual environment

Page 27: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Example: The “Playstation Mountain”

https://www.youtube.com/watch?v=_1YV2sNRK4I

Page 28: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Questions

What do the agents represent?

What behaviours have been implemented?

How many agents can they model?

How have the agents’ brains been represented?

When watching the MASSIVE video, think about:

http://www.youtube.com/watch?v=W5pNPJAhsBI

Page 29: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Example: MASSIVE

http://www.youtube.com/watch?v=W5pNPJAhsBI

http://www.lordoftherings.net/effects/index.html

Page 30: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

What is an agent? (I)

No universal definition

But most people agree that agents should exhibit some of the following criteria

AutonomyAct independently, free from central control

Control its own state and make independent decisions

Page 31: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

What is an agent? (II)

HeterogeneityAgents should not normally be identical

Groups of similar agents are formed from the ground-up (e.g. by agents interacting with each other)

ReactivityAgents can sense their environment and respond to changes

Responses should be goal-directed

Page 32: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

What is an agent? (III)

Bounded rationalityAgents should not have full knowledge of the world (this would be very unrealistic)

Environmental perception can be limited

Choices will not be perfectly rational – they can make mistakes

InteractiveAgents can communicate with each other

Could be dependent on environment (e.g. distance)

Page 33: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

What is an agent? (IV)

MobileOften agents will be able to navigate a space.

Learning / adaptionAgents should be able to adapt future decisions, based on past experiences

Page 34: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Appeal of ABM (I)

Most ‘natural’ way of thinking about social

systems

Individual actions drive the system

Modelling emergence

“A phenomenon is emergent when it can only be described and characterised using terms and measurements that are inappropriate or impossible to apply to the component units” - Gilbert (2004) page 3.

Page 35: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Appeal of ABM (II)

Can include physical

space / social

processes

Designed at abstract level: easy to change scale

Page 36: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Appeal of ABM (III)

Bridge between verbal

theories and

mathematical models

Precise/quantitative

description of theory

Dynamic history of

system

Page 37: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Disadvantages of ABM (I)

Models that use randomness

like this are probabilistic

The need to run many times to

ensure robust results

E.g. Wolf-Sheep model (results

were always different)

Known unknowns

We don’t know exactly what someone will do.

So we guessE.g. There is a 30% change of attending this morning’s lecture, and 70% chance of staying in bed

Page 38: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Disadvantages of ABM (II)

Computationally expensive.Complicated agent decisions

Lots of decisions!

Multiple model runs (robustness)

Modelling “soft” human factorsBenefit that we can include complex psychology

But this is really hard!

Potential to over-complicateNeed to think carefully about what to include

Page 39: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

A Third Way of Doing Science

Deduction Induction

Axelrod, R. (1997). Advancing the art of simulation in the social sciences. In Conte, R., Hegsel-mann, R., and Terna, P., editors, Simulating Social Phenomena, pages 21–40. Springer-Verlag, Berlin.Diagrams from: http://www.socialresearchmethods.net/kb/dedind.php (that site also has a fantastic concise comparison of the two methods)

Third way:“Like deduction, [simulation] starts with a set of explicit assumptions. But unlike deduction, it does not prove theorems. Instead, a simulation generates data that can be analyzed inductively. Unlike typical induction, however, the simulated data comes from a rigorously specified set of rules rather than direct measurement of the real world”

- Axelrod (1997, p24).

Page 40: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Applications

Urban SimulationHow people move around cities

Shopping centres, Art Galleries, evacuation

Crime Simulation

Spread of Disease

Spread of Early Humans from Africa

Full lecture on applications later ..

Page 41: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Lecture 3

(Social) Simulation

A brief history

Uses of Simulation

Introduction to ABM

Seminar: GIS and GeoComputation

Page 42: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Important: Activity Next week

We’re going outside!

Wear warm cloths and sensible shoes

Photo attributed to Tony Alter (CC-BY-2.0)

Page 43: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Masters Degrees

MA Activism & Social Change

MA Social & Cultural Geography

MSc River Basin Dynamics & Management with GIS

MSc Geographical Information Systems (GIS)

MSc GIS via Online Distance Learning

MA/MSc by Research

www.geog.leeds.ac.uk/study/masters

PhD

www.geog.leeds.ac.uk/study/phd

Alumni Fee Bursary

You may be eligible for a 10% alumni tuition fee bursarywww.leeds.ac.uk/info/20021/postgraduate/1923/alumni_bursary

School of GeographyFACULTY OF ENVIRONMENT

Page 44: S OCIAL S IMULATION AND A GENT -B ASED M ODELLING Dr Nick Malleson Dr Alison Heppenstall GEOG3150 Semseter 2 Lecture 3

Seminar 1 – GIS and Geocomputation

Seminar: Compare and contrast Geo-computation methods with GIS.

Reading

Gilbert, Nigel and Klaus G. Troitzsch (2005) Simulation for the Social Scientist. Open University Press

Epstein, J.M., (2009) Modelling to contain pandemics. Nature 460, 687-687.

QuestionsWhat models of systems have you already produced in this course, and others?

Gilbert and Troitzsch say that, when creating a model of a model of a target system, "we hope that conclusions drawn about the model will also apply to the target because the two are sufficiently similar" (p 15) . When you have created models in the past, how have you verified that the two are sufficiently similar?

The authors note that because social systems are dynamic, models should be dynamic as well (p 15). What do they mean by dynamic in this context? Are you familiar with any dynamic models?

How do analytical methods differ to using simulation as a means of understanding how a model develops over time?

What do the authors mean by "explanatory" and "predictive" models?

What are the stages of simulation-based research (p 18). How do these compare to the non-simulation (e.g. GIS) research that you are accustomed with?

How is the 14th centuary principle of Occam's razor relevant to the design of computer models today? (Hint - see 'Designing a Model' on page 19).