Agent Based Modeling and Simulation in the Social Sciences Frank Witmer Computing and Research Services 14 May 2014
Outline What are agent based models? How do they work? What types of questions are they best suited to address? Which software should I use to create one? 2
Agent Based Modeling ABMS Agent based modeling and simulation A computational method for simulating interactions among a set of autonomous agents Goal is to learn about the collective/emergent behavior of agents obeying simple rules A bottom up approach with individual actors and their interactions explicitly modeled Generative models global level properties a function of the agent attributes & rules 3
Model elements: 1) The agents 2) Their relationships 3) The underlying environment 4
Agent Characteristics Self contained & uniquely identifiable Autonomous & self directed Has a state(s) that vary over time Dynamic interactions with other agents Are typically heterogeneous across a diverse population May have the ability to learn & adapt May be goal directed & capable of adjusting its responses based on past progress towards the goal 5
A Typical Agent Source: Macal & North (2010) 6
Justification Nature editorial (2009) advocates computer simulations & ABMS to inform economic policy A way to project the impact of physical changes on human systems 7
When to Use? To model complex systems heterogeneous subsystems or autonomous entities nonlinear relationships & multiple interactions feedback, learning, adaption To model spatial interactions e.g. leaving a burning building, crowd movements, traffic To model heterogeneous individuals e.g. migration To model heterogeneous, complex interactions social networks are rarely homogeneous, instead, clusters often deviate from the average behavior To model complex behavior such as learning and adaptation e.g. stock market trading 8
ABMS for Couple Human & Natural Systems (CHANS) Source: 121 publications identified by An (2012) 9
Challenges What level of detail? Individual? Group? Areal Unit? Implementation can be more art than science Rule specifications for human agents Soft factors such as irrational behavior & subjective choices are difficult to specify Model becomes too complex black box criticism (Lee 1973, 1994) but model can t be simplified too much, else emergent behaviors may be lost 10
Validation Agent rules should be kept as simple as possible to successfully validate Does the computer model accurately represent the real world? 1) Define criteria by which the model output is to be judged 2) Explore various model implementations and parameters to see what works in practice Source: Kniveton et al. (2012) 11
Crowd Movements Helbing et al. (2000) Simulating dynamical features of escape panic. Nature No column Column 12
Migration & Climate Change Example Kniveton et al. (2012) Nature Climate Change Emerging migration flows in a changing climate in dryland Africa View climate change & migration as a complex adaptive system Climate change related migration is nonlinear, and is amplified by population growth 13
Tanzania Rainfall Migration Model Source: Smith (2014) 14
Violence in Afghanistan Bhavnani & Choi (2012) Modeling Civil Violence in Afghanistan: Ethnic Geography, Control, and Collaboration. 2 kinds of agents: civilian & political Attributes: Ethnic identity Ethnic salience Risk taking propensity Character/personal preferences 15
Violent Conflict Example Source: Bhavnani & Choi (2012) 16
Software Tools Wikipedia list of ABMS tools https://en.wikipedia.org/wiki/comparison_of_agent based_modeling_software 80+ tools listed most use Java or C++ NetLogo, Northwestern good for novice modelers; includes good examples & tutorials model & visualization are tightly entwined StarLogo, MIT similar to NetLogo, but includes a graphical programming interface AnyLogic, from St. Petersburg Technical Univ. commercial software, Java based supports parameter optimization simulations Repast, Argonne National Lab active user listserve MASON, George Mason Multi Agent Simulator Of Neighborhoods/Networks designed to be very fast, with a good random number generator 17
Capability vs. Ease of Use MASON cs.gmu.edu/~eclab/projects/mason/ Modified from Macal & North (2006) 18
NetLogo Demo NetLogo has 4 types of agents: Turtles: agents that move around in the world. Patches: The world is two dimensional and is divided up into a grid of patches. Each patch is a square piece of "ground" over which turtles can move. Links: agents that connect two turtles. Links can be directed ( from one turtle to another turtle) or undirected (one turtle with another turtle). The Observer: does not have a location you can imagine it as looking out over the world of turtles, links and patches. 19
Upcoming ABMS Events SwarmFest 2014 Jun 29 Jul 1, Univ. of Notre Dame http://www.swarmfest2014.org/ Workshop at John Hopkins Center for Advanced Modeling Graduate Workshop, July 10 12 Graduate students will present ABM work http://web.jhu.edu/announcements/facultystaff/targetpage.html?baid=47166 20
References An, L. (2012) Modeling human decisions in coupled human and natural systems: Review of agentbased models. Ecological Modelling 229: 25 36. Bhavnani, R. & H.J. Choi (2012) Modeling Civil Violence in Afghanistan: Ethnic Geography, Control, and Collaboration. Complexity 17(6): 42 51. Bonabeau, E. (2002) Agent based modeling: methods and techniques for simulating human systems. Proceedings of the National Academy of Sciences 99 (3): 7280 7287. Kniveton, D., C. Smith & R. Black (2012) Emerging migration flows in a changing climate in dryland Africa. Nature Climate Change 2(6): 444 447. Lee, D. (1973) Requiem for large scale models. Journal of the American Institute of Planners 39(3): 163 178. Lee, D. (1994) Retrospective on large scale urban models. Journal of the American Planning Association 60(1): 35 40. Macal, C. & M. North (2006) Introduction to Agent based Modeling and Simulation. MCS LANS Informal Seminar, November 29. Macal, C. & M. North (2010) Tutorial on agent based modelling and simulation. Journal of Simulation 4:151 162. Nature editorial (2009) A model approach: More development work is needed to help computer simulations inform economic policy. Nature 460(7256): 667. Omerod, P. & B. Rosewell (2009) Validation and verification of agent based models in the social sciences. in Epistemological Aspects of Computer Simulation in the Social Sciences, ed. Flaminio Squazzoni, pp 130 140. Smith, C. (2014) Modelling migration futures: development and testing of the Rainfalls Agent Based Migration Model Tanzania. Climate and Development 6(1): 77 91. 21