GEOG3150 Semester 2

Lecture 7


Agent-Based Modelling
& Geography


Dr Nick Malleson
Dr Alison Heppenstall

Click here for full screen

How to use these slides

These slides are made using HTML, so they need to be read on-line. You can use the arrows in the bottom-right corner to move between slides, or press the right/left arrows on your keyboard. Pressing escape gives an overview of all slides.

There are also notes for some of the slides. To see these, either print out the slides (instructions below) or press the 's' key. This puts you into a different mode that will show notes alongside slides.

If you would like to print them out for offline reading, or save them as a pdf, you need to add '?print-pdf' to the end of the URL, like so:

http://www.geog.leeds.ac.uk/courses/level3/geog3150/lectures/lecture7/lecture7.html?print-pdf

Then you can print as normal (e.g. File -> Print). Depending on the version of your browser, you might also need to select'landscape' paper type..

Google Chrome logo

Important: printing only works using Google Chrome

Recap: The Model Building Process

Preparation: Literature review

what do we know about fully?

what do we know about in sufficient detail?

what don't we know about? (and does this matter?)

What can be simplified?

Preparation: Data review

Outline the key elements of the system, and compare this with the data you need.

What data do you need?

What can you do without?

What can't you do without?

Designing and building the model

ODD (Overview, Design concepts, Details)

KISS / KIDS

Recap: The Model Building Process

Verification

Does the implementation match the design?

Are there any bugs?

Calibration

Adjusting parameters to fit real-world data

Validation

Testing the model on new data.

Prediction / Explanation

Outline: ABM and Geography

  1. Why include geography?
  2. Different types of environment
  3. Combining ABM and GIS

Reasons to model

1. Exploring theory (explanatory models)

Implement the theoretical understanding of behaviour

Can explore the dynamics that play out

Test the effects of different theories

Model/results are unencumbered by geographical complexity (e.g. Elffers and van Baal, 2008)

Easy to understand what the mode is doing

Reasons to model

2. Real-world predictions (predictive models)

Models with abstract environments a great in some situations

But what about making real-world predictions?

In some cases the underlying geography is a fundamental part of the model and abstracting space is not appropriate

E.g., "what affect will this road closure have on burglary rates in Headingley?"

Example: Exploring crime theory

Birks (2012) model environment

Birks et al. (2012)

Randomly generated abstract environments

Theoretical 'switches'

Rational choice perspective

Routine activity theory

Geometric theory of crime

Example crime theories

Compare results to expected outcomes:

Spatial crime concentration

Repeat victimisation

Journey to crime curve

Example: Exploring crime theory

TheoryEnabledDisabled
Routine activities Agents assigned a 'home' and routine paths Random movements
Rational choice Victim attractiveness (based on risk, reward, effort) Homogeneous target attractiveness
Awareness space Dynamic awareness - alters offender decision-making Uniform environment awareness
Theoretical 'switches' in the model

Results:

All hypotheses are supported

Rational choice has lower influence

Example: Real crime patterns

Mastermap topography

This model uses a more realistic geography (part of East Leeds)

Buildings / houses

Roads

Alleyways

Railway lines

etc.

Able to explore the impacts that changes to the environment or changes in behaviour have on crime in a real area

www.youtube.com/embed/5ySbS075MyA

Space and place.

The choice of model type (explanatory or predictive) is similar to space & place arguments in geography.

Space

Abstract

Blank canvas, a container, impersonal

A geographic space that is completely homogeneous

Place

Experienced, personal, layered

Has meaning imposed by personal experience or some collective significance (e.g. landmarks).

Heterogeneous

time geography

Time Geography

Explore fundamental geographical theories with agent-based models

Envisaged before we had imagined the possibilities that computers could offer.

Time Geography (Hägerstrand, 1970) is a great example.

A conceptual framework for understanding human spatial behaviour

Examine how movements are constrained by space and time

Space-Time Path

Traces the movement of an individual through space and time.

Space-Time Prism

Ability to reach locations in space and time, under constraints of fixed activity points

example agent movements

This is an example from Nick's thesis. It shows the movements in space and time of two agents.

fox hunting
Photo attributed to Justortitri, (CC BY-NC-SA 2.0)

Environment Quiz

You want to create a model to better understand fox hunting by simulating a hunt in progress (riders, hounds, foxes). The aim is to find out how many foxes are needed for an enjoyable killing spree, and where they should be located.

List some elements that you would want to include in a virtual environment for this model.

 
 
 
 
 

Would you use an abstract or a more realistic environment?

Outline: ABM and Geography

  1. Why include geography?
  2. Different types of environment
  3. Combining ABM and GIS

Different types of geography: Abstract Grids

2D Schelling example

Objects located at discrete (integer) coordinates

Can only move onto cells

Similar to raster GIS data model

Often conduct neighbourhood / proximity queries

Which cells are next to me?

Different types of geography: Continuous space

Continuous geography

Objects located at arbitrary decimal coordinates

Can move to any location within the boundary of the world

Often the researcher restricts these movements to roads, paths, etc.

Conduct spatial queries

Find all objects within 10 meters

Find objects that are within a boundary

Continuous space example

http://www.freeasteroids.org/

Boundaries of the world

What happens if an agent tries to walk outside the boundary of the world?

Agents bounce back from the boundary (bouncy?)

Walls absorb agent momentum (absorbent?)

Left/right and up/down borders joined together (torus)

Choice of boundaries depends on the application area

Torus example

http://www.freeasteroids.org/

Boundaries Quiz

Can you think of some example applications that require the different types of boundary.


Bouncy:


Absorbent:


Torus:

Different types of geography(?): A-Spatial

So far, we have come across grid and continuous space environments.

In some models, a geographical environment is not needed.

E.g. a social network

Can still account for interactions, complexity, emergence, non-linearity, etc. etc.

Can you think of a scenario where an a-spatial agent-based model would be appropriate?

Outline: ABM and Geography

  1. Why include geography?
  2. Different types of environment
  3. Combining ABM and GIS

Realistic geographic environments

Unsurprisingly, agent-based models in geography often attempt to include a realistic representation of physical space

Often essential for explanatory models (although not always).

Hence some mechanism is needed to incorporate spatial data into a model

Common solution: GIS + ABM

Issues with combining ABM & GIS: Time

GIS are inherently static

GIS data model represents a single point in time

Some work into a temporal GIS data model, but no widespread solutions

But time essential in an ABM

Need to link GIS and ABM

Two approaches: loose vs tight/close coupling

Loose coupling

Loose coupling

Loose coupling

Have you loosely coupled a GIS and a model in other work?

Maybe in your semester 1 projects?

 
 
 
 
 

Loose Coupling Example

NetLogo Grand Canyon rainfall model

Wilensky, U. (2006). NetLogo Grand Canyon model. http://ccl.northwestern.edu/netlogo/models/GrandCanyon Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

Tight coupling

Tight coupling

Tight coupling example: Agent Analyst

Agent analyst example by Elizabeth Groff

Groff, E. R. (2006). Exploring the Geography of Routine Activity Theory: A Spatio-temporal Test Using Street Robbery. Unpublished Dissertation, University of Maryland, College Park, MD.

Agent-based model of street robbery

Uses the 'Agent Analysis' ArcGIS plugin.

Shows the initial start locations of the three types of agents

Criminals (i.e., citizens with criminal propensity)

Citizens (i.e., citizens without criminal propensity)

Cops (that's American for 'Police').

Agent analyst example by Elizabeth Groff

Groff, E. R. (2006). Exploring the Geography of Routine Activity Theory: A Spatio-temporal Test Using Street Robbery. Unpublished Dissertation, University of Maryland, College Park, MD.

Agent Analyst

Pattern after three days for street robbery.

Map updated dynamically as the model runs

Upper left: parameters window

(This wasn't used, all changes coded into the model directly

Lower left: graph of three of the variables in the model:

totalRobberies - the total number of robberies at an intersection

totalDeterred - the number of times the presence of a police officer stopped an offender from deciding to commit a robbery

totIntersect - the number of times more than one citizen agent was at a node at the same time so that a crime might occur.

Loose vs. Tight coupling

Loose

Efficient: GIS are slow, allowing the model to run on its own will almost certainly be quicker

Flexible: The model can run on any computer system, including high-performance 'grid' systems

Free: The model is not tied to a proprietary GIS so can be released and reused freely by others. (Note: Open-source GIS systems are available, e.g. QuantumGIS and GRASS)

Tight

Convenient: Easy to see what the model is doing while it is running

Interactive: Possible to interact with the model and influence an individual model run.

Reusable: Stakeholders / users will find it easier to use if it is built into their GIS.

Summary: ABM and Geography

  1. Why include geography?
  2. Different types of environment
  3. Combining ABM and GIS

References

Elffers, H. and van Baal, P. (2008). Realistic spatial backcloth is not that important in agent based simulation: An illustration from simulating perceptual deterrence. In Liu, L. and Eck, J., editors, Artificial Crime Analysis Systems: Using Computer Simulations and Geographic Information Systems, chapter 2, pages 19-34. IGI Global.

Birks, Daniel, Michael Townsley, and Anna Stewart. Generative Explanations of Crime: Using Simulation to Test Criminological Theory. Criminology 50, no. 1 (2012): 221-254.

Miller, H. J. (2005) A measurement theory for time geography. Geographical Analysis 37(11): 17-45.

Hägerstrand, T. (1970) What about people in regional science? Papers of the Regional Science Association 24(1): 6-21.

Groff, E. R. (2006). Exploring the Geography of Routine Activity Theory: A Spatio-temporal Test Using Street Robbery. Unpublished Dissertation, University of Maryland, College Park, MD.