Gors intro abm

30
An Introduction to Agent-Based Modelling, GORS, London, 24 th Sept. 2013. slide 1 An Introduction to Agent-Based Modelling Bruce Edmonds Centre for Policy Modelling Manchester Metropolitan University

description

 

Transcript of Gors intro abm

Page 1: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 1

An Introduction to Agent-Based Modelling

Bruce EdmondsCentre for Policy Modelling

Manchester Metropolitan University

Page 2: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 2

Society is Complex!

• This may not be a surprise to many of you..• …but in the sense of complexity science it means

that significant global outcomes can be caused by the interactions of networks of individuals

• In other words, the outcomes are not modellable if you do not model interactions between individuals or model only the interaction of global variables…

• …and if you try to model it in these ways, you will often be caught out be surprises

• Agent-based simulation allows the exploration of such surprises but it is still a maturing field

Page 3: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 3 Social influence and the domestic demand for water, Aberdeen 2002, http://cfpm.org/~bruce slide-3

Equation-based or statistical modelling

Real World Equation-based Model

Actual Outcomes

AggregatedActual Outcomes

AggregatedModel Outcomes

Page 4: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 4

Individual- or Agent-based simulation

Real World Individual-based Model

Actual Outcomes Model Outcomes

AggregatedActual Outcomes

AggregatedModel Outcomes

Agent-

Page 5: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 5

What happens in ABSS

• Entities in simulation are decided on• Behavioural Rules for each agent specified (e.g. sets of

rules like: if this has happened then do this)• Repeatedly evaluated in parallel to see what happens• Outcomes are inspected, graphed, pictured, measured

and interpreted in different ways

Simulation

Representations of OutcomesSpecification (incl. rules)

Page 6: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 6

Example 1: Schelling’s Segregation Model

Schelling, Thomas C. 1971. Dynamic Models of Segregation. Journal of Mathematical Sociology 1:143-186.

Rule: each iteration, each dot looks at its 8 neighbours and if less than 30% are the same colour as itself, it moves to a random empty square

Segregation can result from wanting only a few neighbours of a like colour

Page 7: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 7

Characteristics of agent-based modelling

• Computational description of process• Not usually analytically tractable • More specific…• … but assumptions are less ‘brave’• Detail of unfolding processes accessible

– more criticisable (including by non-experts)– but can be more convincing that is warrented

• Used to explore inherent possibilities• Validatable by a variety of data kinds…

– but needs LOTS of data to do this

• Often very complex themselves

Page 8: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 8

Micro-Macro Relationships

Micro/ Individual data Qualitative, behavioural, social psychological data

Theory, narrative accounts

Social, economic surveys; Census Macro/ Social data

Simulation

Page 9: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 9

Choosing Simulation Techniques

• Every simulation technique has pros and cons• The hardest decision is when to use which approach

(or how to combine approaches)• Analytic approaches rely on their formulation being

simple enough to be solvable (or, in practice, they use simulation anyway)

• Statistical approaches rely (in different and subtle ways) on the representation of noise as random – they will miss surprises in their projections

• Agent-based approaches are complex, require lots of data and do not give probability forecasts

• Simplicity is no guarantee of truth or generality

Page 10: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 10

Meaning from intermediate abstraction (often implicit)

target system

mental model

formal model

(Meaning)

Page 11: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 11

In Vitro vs In Vivo

• In biology there is a well established distinction between what happens in the test tube (in vitro) and what happens in the cell (in vivo)

• In vitro is an artificially constrained situation where some of the complex interactions can be worked out…

• ..but that does not mean that what happens in vitro will occur in vivo, since processes not present in vitro can overwhelm or simply change those worked out in vitro

• One can (weakly) detect clues to what factors might be influencing others in vivo but the processes are too complex to be distinguished without in vitro experiments

Page 12: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 12

Some modelling trade-offs

simplicity

generality

Lack of error (accuracy of results)

realism(design reflects observations)

Page 13: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 13

Example 2: A model of social influence and water demand

• Part of a 2004 study for EA/DEFRA, lead by the Stockholm Environment Institute (Oxford branch)

• Investigate the possible impact of social influence between households on patterns of water consumption

• Design and detailed behaviour from simulation validated against expert and stakeholder opinion at each stage

• Some of the inputs are real data• Characteristics of resulting aggregate time series

validated against similar real data

Page 14: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 14

Simulation structure

• Activity

• Frequency

• Volume Households

Policy

Agent

• Temperature

• Rainfall

• Daylight

Ground

Aggregate Demand

• Activity

• Frequency

• Volume Households

Policy

Agent

• Temperature

• Rainfall

Ground

Aggregate Demand

Page 15: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 15

Some of the household influence structure

- Global Biased- Locally Biased- Self Biased

Page 16: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 16

Example results: relative aggregate domestic demand for water (1973 = 100)

Aggregate demand series scaled so 1973=100

0

20

40

60

80

100

120

140

160

180

200

J-73

J-74

J-75

J-76

J-77

J-78

J-79

J-80

J-81

J-82

J-83

J-84

J-85

J-86

J-87

J-88

J-89

J-90

J-91

J-92

J-93

J-94

J-95

J-96

J-97

Simulation Date

Re

lative

De

ma

nd

Page 17: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 17

Conclusions from Example 2

• The use of a concrete descriptive simulation model allowed the detailed criticism and, hence, improvement of the model

• The inclusion of social influence resulted in aggregate water demand patterns with many of the characteristics of observed demand patterns

• The model established how:– processes of mutual social influence could result in

differing patterns of consumption that were self-reinforcing

– shocks can shift these patterns, but not always in the obvious directions

– the importance of introduction of new technologies

Page 18: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 18

Example 3: Developing Work

• Institute for Social Change &Theoretical Physics Group,University of Manchester

• Centre for Policy Modelling,Manchester Metropolitan University

Page 19: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 19

the SCID Modelling Approach

Data-Integration Simulation Model

Micro-Evidence Macro-Data

Abstract Simulation Model 1

Abstract Simulation Model 2

SNA Model Analytic Model

Page 20: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 20

Overall Structure of Model

Underlying data about population composition

Demographics of people in households

Social network formation and maintenance (homophily)

Influence via social networks• Political discussions

Voting Behaviour

Inpu

t

Out

put

Page 21: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 21

Discuss-politics-with person-23 blue expert=false neighbour-network year=10 month=3

Lots-family-discussions year=10 month=2

Etc.

Memory

Level-of-Political-Interest

Age

Ethnicity

ClassActivities

A H

ou

se

ho

ld

An Agent’s Memory of Events

Etc.

Changing personal networks over which

social influence occurs

Composed of households of individuals initialised from

detailed survey data

Each agent has a rich variety of individual (heterogeneous)

characteristics

Including a (fallible) memory of events and influences

Page 22: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 22

Example Output: why do people vote (if they do)

Intervention: voter mobilisation

Effect: on civic duty norms Effect: on habit-

based behaviour

Page 23: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 23

Simulated Social Network at 1950

Established immigrants: Irish, WWII Polish etc.

Majority: longstanding ethnicities

Newer immigrants

Page 24: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 24

Simulated Social Network at 2010

Page 25: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 25

Possibilistic vs Probibilistic

• The idea is to map out some of the possible social processes that may happen

• Including ones one would not have thought of or ones that have already happened

• The global coupling of context-dependent behaviours in society make projecting probabilities problematic

• Increases understanding of why processes (such as the spread of a new racket) might happen and the conditions that foster them

• Complementary to statistical models

Page 26: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 26

Role of ABM in Policy Assessment

• ABMs are good for analysing risk – how a more standard model/prediction might go/be wrong

• That is, testing the assumptions behind simpler models (statistical, discrete event, system dynamic, etc.)…

• …so exploring the possible deviations from their forecasts

• In other words, showing some of the possible surprises that could occur (but not all of them)

• To inform a risk analysis that goes with a forecast• Can be used for designing early-warning indicators of

newly emergent trends

Page 27: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 27

ABSS Advantges

• ABSS allows the production and examination of possible complex outcomes that might emerge

• It does not need such strong assumptions (that analytic approaches require) to obtain results

• It allows the indefinite experimentation and examination of outcomes (in vitro)

• It aids the integration and use of a wider set of evidence, e.g. very open to stakeholder critique

• It suggests hypotheses about the complex interactions in observed (in vivo) social phenomena

• So allowing those ‘driving’ policy to be prepared, e.g. by implementing ‘early warning systems’

• Can be complementary to other techniques

Page 28: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 28

ABSS Disadvantages

• It does not magically tell you what will happen• Are relatively time-consuming to construct• It can look more convincing that is warranted• Understanding of the model itself is weaker• It needs truck loads of data for its validation• It gives possibilities rather than probabilities• Fewer good practitioners around• Not such a mature field

Page 29: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 29

To Learn More

• Simulation for the Social Scientist, 2nd Edition. Nigel Gilbert and Klaus Troitzsch (2005) Open University Press. http://cress.soc.surrey.ac.uk/s4ss/

• Simulating Social Comlexity – a handbook. Edmonds & Meyer (eds.) (2013), Springer.

• Journal of Artificial Societies and Social Simulation, http://jasss.soc.surrey.ac.uk

• European Social Simulation Association, http://essa.eu.org

• NetLogo, a relatively accessible system for doing ABM http://ccl.northwestern.edu/netlogo

• OpenABM.org, an open archive of ABMs, including code and documentation

Page 30: Gors   intro abm

An Introduction to Agent-Based Modelling, GORS, London, 24th Sept. 2013. slide 30

Thanks!

Bruce Edmonds

http://bruce.edmonds.name

Centre for Policy Modelling

http://cfpm.org

I will make these slides available at: http://www.slideshare.net/BruceEdmonds