GEOG3150 Semseter 2 Lecture 3 SOCIAL SIMULATION AND AGENT-BASED MODELLING Dr Nick Malleson Dr Alison Heppenstall Recap: Last Week Last week; first forays into the wonderful world of programming. Introduction to Netlogo Practical How did everyone get on with the practical? 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 thinking Problem 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.” 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) Some Readings Papers – 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 agentbased?, 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/anexcellent-abm-paper/ Textbook Heppenstall, A.J., Crooks, A.T., See, L.M. and Batty, M. (2012) Agent-based models of Geographical Systems. Springer: Dordrecht. Other resources Prof. Bruce Edmonds is one of the big names in agentbased 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 Lecture 3 (Social) Simulation A brief history Uses of Simulation Introduction to ABM Seminar: GIS and GeoComputation 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 (socioeconomic) processes. 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…? 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 knowhow What else? Acceptance that we need new tools! Aggregate versus individual Scales of analysis Interest in individual behaviour DATA, DATA, DATA!!! 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. Lecture 3 (Social) Simulation A brief history Uses of Simulation Introduction to ABM Seminar: GIS and GeoComputation Uses of simulation (from Gilbert and Troitzsch, 2005) Understanding Experimentation: Can we gain new insights and understanding of the world? Test existing theories. Prediction If 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. 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? Training Creation of programs/environments to train experts e.g. virtual car and flight simulators Uses of Simulation (3) Discovery and Formalisation discover new processes and knowledge about the phenomenon we are simulating through experimentation Formalise this into new theories Retire rich and smug. Uses of Simulation (4) Entertainment: MASSIVE (LoTR) http://www.youtube.com/watch?v=ixJiHx7jGx8 (esp. 3:10, 3:55) 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. Why is social simulation important to Geographers? 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? 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? Lecture 3 (Social) Simulation A brief history Uses of Simulation Introduction to ABM Seminar: GIS and GeoComputation Aggregate vs Individual Level ‘Traditional’ modelling methods work at an aggregate level, from the top-down Ci = α + βxi + βyi + βzi E.g. Regression, spatial interaction modelling, locationallocation, etc. Aggregate vs. individual-level Aggregate models work very well in some situations Homogeneous 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 Aggregate vs. individual-level Systems are driven by individuals (cars, people, ants, trees, whatever) Not controlled by god Bottom-up modelling An 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/) Agent-Based Modelling (ABM) Autonomous, interacting agents Represent individuals or groups Situated in a virtual environment Example: SimCity https://www.youtube.com/watch? v=vS0qURl_JJY Photo attributed to James Cridland Example: The “Playstation Mountain” https://www.youtube.com/watc h?v=_1YV2sNRK4I http://www.youtube.com/watch?v=W5pNPJAhsBI Questions When watching the MASSIVE video, think about: What do the agents represent? What behaviours have been implemented? How many agents can they model? How have the agents’ brains been represented? Example: MASSIVE http://www.youtube.com/watch?v=W5pNPJAhsBI http://www.lordoftherings.net/effects/index.html What is an agent? (I) No universal definition But most people agree that agents should exhibit some of the following criteria Autonomy Act independently, free from central control Control its own state and make independent decisions What is an agent? (II) Heterogeneity Agents should not normally be identical Groups of similar agents are formed from the ground-up (e.g. by agents interacting with each other) Reactivity Agents can sense their environment and respond to changes Responses should be goal-directed What is an agent? (III) Bounded rationality Agents 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 Interactive Agents can communicate with each other Could be dependent on environment (e.g. distance) What is an agent? (IV) Mobile Often agents will be able to navigate a space. Learning / adaption Agents should be able to adapt future decisions, based on past experiences 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. Appeal of ABM (II) Can include physical space / social processes Designed at abstract level: easy to change scale Appeal of ABM (III) Bridge between verbal theories and mathematical models Precise/quantitative description of theory Dynamic history of system Disadvantages of ABM (I) Known unknowns We don’t know exactly what someone will do. So we guess E.g. There is a 30% change of attending this morning’s lecture, and 70% chance of staying in bed 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) Disadvantages of ABM (II) Computationally expensive. Complicated agent decisions Lots of decisions! Multiple model runs (robustness) Modelling “soft” human factors Benefit that we can include complex psychology But this is really hard! Potential to over-complicate Need to think carefully about what to include A Third Way of Doing Science Deduction Induction 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 speciļ¬ed set of rules rather than direct measurement of the real world” - Axelrod (1997, p24). 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) Applications Urban Simulation How 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 .. Lecture 3 (Social) Simulation A brief history Uses of Simulation Introduction to ABM Seminar: GIS and GeoComputation Important: Activity Next week We’re going outside! Wear warm cloths and sensible shoes Photo attributed to Tony Alter (CC-BY-2.0) School of Geography FACULTY OF ENVIRONMENT 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 bursary www.leeds.ac.uk/info/20021/postgraduate/1923/alumni_bursary Seminar 1 – GIS and Geocomputation Questions Seminar: Compare and contrast Geocomputation 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. What 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).