Synonyms

Individual-based simulation modeling

Overview

Many questions in criminology focus on dynamic processes and individual decision-making. For example, crime events represent the end result of a multitude of decisions made by a variety of different people in the context of specific situations. Potential offenders, potential victims, police, and other informal guardians of places make choices that bring them together at the same place and time. However, data describing any of those individual decisions prior to, during, and after the crime event are only rarely available and never complete. Once at a place, potential victims may take actions that make them a more suitable target. Potential offenders observe these actions and reevaluate the likelihood of getting away with a crime. At the same time, likely offenders also notice the actions of potential guardians and make adjustments. Even if data were collected to document the actions of individuals, the dynamic and nonlinear nature of human interaction and decision-making makes them difficult to study using traditional statistical techniques.

Agent-based modeling is a type of computer simulation modeling that allows the study of dynamic processes and the outcomes that emerge from individual decisions. An artificial world, akin to a scientific version of a video game, is created. This model is a simplified version of “real life” that contains only the most important aspects of the behavior being simulated. The computer program is initiated and the agents (i.e., representations of individuals) in the model interact. The patterns of outcomes produced by those interactions, for example, a distribution of crime events, is then compared with the pattern theory would predict or empirical data indicates. Since, we would expect that crime would concentrate across space, so geographic patterns of crime from a model should evidence this characteristic. Agent-based models (ABMs) allow group-level outcomes to emerge from individual decision-making. They enable researchers to conduct “what if” experiments because the outcome under alternative scenarios is known (i.e., both the control condition and the treatment condition can be simulated). The bottom-up approach, rather than the top-down of traditional statistical models, combined with the ability to systematically change the rules governing individual decision-making, creates a powerful modeling environment for exploring and strengthening theory as well as uncovering new insights.

Fundamentals of Agent-Based Modeling

Some Background and Basic Definitions

Computer simulation is a broad area of study. Flight simulators are a familiar example of a computer simulation that allows the user to practice flying an airplane. Agent-based modeling is one type of simulation modeling within the general category of computer simulation modeling “that enables a researcher to create, analyze, and experiment with models composed of agents that interact within an environment” (Abdou et al. 2012, p. 141). Models are simplified versions of the real world and have long been used to understand both structure and process. Simulation models are simply models that are programmed to run inside a computer and as such they share many characteristics with computer games but their purpose is scientific rather than recreational. An agent-based model (ABM), then, is a simplified representation of a real-world process that is implemented in the form of a computer program. ABMs employ a bottom-up approach in which agents are imbued with unique characteristics and general behavioral rules (Epstein and Axtell 1996; Gilbert and Troitzsch 2005). The agents in an ABM are typically individuals but can also represent collective entities such as neighborhoods or schools as well as companies or organizations. The fact that the agents are autonomous and make decisions based on the changing circumstances that occur during the running of the model is what makes ABMs unique. Because the decisions of individual agents are at the heart of ABMs, they are said to take a bottom-up approach to modeling processes. The individual decisions made by agents are what generate the outcome. This characteristic is what makes ABMs so valuable for modeling social processes as outcomes of individual decisions. It is also what has led some to call it a generative social science (Epstein and Axtell 1996). A core characteristic of agent-based models (shared by cellular automata) is the capacity to produce unexpected results. The term emergence is used to describe outcomes from a model that were not anticipated.

Simulation models, in general, have a variety of uses (Gilbert and Troitzsch 2005). They can be used to improve our understanding of processes that are hard to measure directly. Offender decision-making is an example of one potentially fruitful area of inquiry because we can look inside the criminal decision-making process and examine the relative importance of each piece of information considered. Another use of ABMs is for prediction. If a model is built that can faithfully reproduce a dynamic process, then it can be used to predict an outcome based on different inputs or different behavioral rules. One example of prediction using ABMs are the models used to predict changes in demographic structure based on decisions related to decisions regarding age of first childbirth, family size, and other related factors. Not all ABMs are suitable for prediction; specifically in the case of micro-level ABMs that test nonlinear theories, prediction is not an appropriate standard because they are inherently unpredictable (Gilbert and Troitzsch 2005). ABMs are of particular interest to scientists because of their utility for discovery and formalization. A simple model can be created that embodies a theory about how a process works. The simulation can be run in the computer and the outcomes tested to discover whether the predicted outcomes occur. In order to create such a model, the scientist must formalize critical aspects of the theory in order to program it. The process of formalization is important because it forces scientists to increase their precision as compared to verbal or statistical realizations of a theory. In this tradition, simulation allows for the exploration and elaboration of theory (Dowling 1999). Some have proposed that ABM can be used to investigate theoretical mechanisms and provide a way to eliminate potential explanations that cannot be grown from individual behavior (Eck and Liu 2008a; Epstein and Axtell 1996).

Components of an ABM

An ABM has two main components, the agents and the environment in which the agents interact. While there is no standard definition, an agent can be thought of as an “autonomous goal-directed software entity” (O’Sullivan and Haklay 2000, p. 1410). Agents have characteristics and behaviors which are modeled after their real counterparts. The environment in which they interact also can have characteristics and rules.

Agents and Their Characteristics

Agents can represent people such as potential offenders or police officers. Even groups of people with a collective identity such as neighborhoods, gangs, businesses, or city departments can be agents.

Agents share several general characteristics, only a few of which are highlighted here (Crooks and Heppenstall 2012). First, they are autonomous; they make decisions for themselves. Second, agents are heterogeneous. They have a set of characteristics that are unique to them. For example, an agent representing a police officer can have a race, a gender, an age, a number of years on the job, and any other characteristic pertinent to the goal of the model. More importantly, each police officer agent can have their own values for each of those characteristics. This means the modeler can have an agent’s characteristics factor into her own decisions as well as the decisions made by other agents.

Third, agents are proactive and have goals that guide their actions. They are interacting and changing over time. They can interact with other agents and perceive and react to their environment. In the case of individuals, the actions they undertake often require movement. For example, a police officer agent may begin patrolling using a random pattern within her assigned beat. She is constantly scanning her immediate environment with the goal of identifying crime events and stopping them. A potential offender may proceed through a number of routine activities. During the course of those activities he may notice the quality of opportunities to commit a crime he encounters. Whether or not he takes advantage of those opportunities may depend on whether it will make him late for his legitimate job, whether a police officer is at the same place and his perceived chance of success as compared to potential reward. But organizations, such as businesses, can also be dynamic and take purposive action. For example, they can choose to reinvest in the community in reaction to public pressure or continue to prioritize maximizing profits.

Each type of agent in a model is given a set of rules that guide their behavior and interactions with other agents and their environment (Crooks and Heppenstall 2012). For example, an offender agent would have a different rule set than a police officer.

Agents are typically created within an object-oriented programming environment (Abdou et al. 2012). Such programs contain collections of classes and objects. Classes describe groups of agents that share the types of actions they can undertake. For example, citizens would be in a different class from police officers since only police officers can make arrests. Each class has a set of shared attributes and methods. Attributes are the characteristics of the agents. For example, attributes of age, offending propensity, and income are possible if the agents represent people. Characteristics are unique to each agent. Methods are the actions members of a class can undertake (e.g., movement, making an arrest, committing a crime). During the model run, classes are instantiated in the form of objects representing individual agents with unique characteristics. For example, the first agent might be 24 years old, have an offending propensity of .49, and an income of $129 per week. The next agent might be 62 years old, have an offending propensity of .05, and income of $1,129 per week. Both agents have the ability to move and to commit crime because these methods belong to each agent in that class.

Environments in ABM

All agents exist in an environment and this is what allows them to interact with each other and with their surroundings (Crooks and Heppenstall 2012; Gilbert and Troitzsch 2005). However, there are several types of environments that can be used, and the type of environment chosen is dependent on the phenomena being modeled (Gilbert and Troitzsch 2005). In some models, there is no need for movement. For example, deterrence theory has been tested by modeling an agent’s likelihood of engaging in income tax fraud based on their own and their neighbor’s experience with being audited and the perceived rewards of cheating (van Baal 2004). Environments can also provide a spatial context for agents to interact.

Spatial context can be derived from the position in geometric space or geographic space. Geometric spaces can be represented as grids (similar to the squares on a checkerboard) or networks. Each agent is located within the geometric space. Some models have agents on a grid that can move from one adjacent grid cell to another. Other models have agents connected to one another via a social network (with the agents as nodes and the connections as lines). Networks in models can represent connections that are physical (e.g., a transportation network) or relational (e.g., friendships or trading relationships).

Models that use geographic space are enhanced by situating agents in “real” environments. These “real” environments can be raster surfaces describing land use or the street network from a city. Such simulations use data created by a geographic information system as the environment in the simulation model but do not actively use the topological properties of the data during the model run.

There are also software packages that integrate GIS and ABM to provide a platform for the dynamic modeling of individuals across space and time. One example is Agent Analyst, which follows the middleware approach in which the temporal relationships are handled by the ABM software and the topological relationships are managed by the GIS (Brown et al. 2005). Agent Analyst combines two of the most popular packages for ABM and GIS, the Recursive Porous Agent Simulation Toolkit (Repast) and ArcGIS. To make the software easier to use, Agent Analyst is built using the rapid development version of Repast called Repast for Python Scripting (RepastPy) which has a graphical user interface that automates much of the programming to create the framework of a model (see Johnston, 2012 for an introduction to Agent Analyst). Agent Analyst is designed to be added into ArcGIS as a toolbox. Once the toolbox is added in ArcGIS, models can access shapefiles allowing (1) individual agents to become spatially aware and (2) the visualization of agent movement and decision outcomes (e.g., patterns of crime events).

The integration of ABM and GIS leverages the temporal capabilities of ABMs and the spatial capabilities of GIS. ABMs permit the researcher to (1) collect data about the characteristics of each individual present during an interaction, (2) randomly assign characteristics to agents greatly reducing the possibility of systematic bias, (3) have agents make independent decisions within behavioral guidelines, and (4) systematically vary one attribute while holding all others constant to undertake controlled, repeatable experiments (Epstein and Axtell 1996). GIS makes it possible to take into account how the characteristics of the real environment (e.g., transportation networks and land use) impact the activities of spatially aware agents.

ABM as Methodology

ABM is a research methodology in its own right (Axelrod 2007). Some have suggested it is a third type of scientific inquiry (Axelrod 2007) in addition to deduction and induction. Like deduction, the beginning point is a set of theoretically based assumptions, but instead of proving theorems, ABM produces data which is analyzed inductively. But these data have not been measured empirically (in the real world); they have been generated from agent interactions in a virtual world. It lends itself to conducting thought experiments, but in a virtual world.

Other scholars have labeled ABM a third symbol system in addition to natural language and mathematics (Ostrom 1988). ABM is capable of incorporating both natural language descriptions of behavior and relationships as mathematical ones but is not limited to one or the other. ABM allows the researcher to examine “bottom-up” processes that involve the interactions of heterogeneous individuals with each other and with their environment. Thus, ABM can be used to systematically examine complex and dynamic relationships at the individual level.

The guiding principle of ABM is “simpler is better.” Modelers want to build a model that is as simple as possible while maintaining the most important aspects of the target phenomena. This is primarily because complex virtual behavior often develops from relatively simple rule sets. In order to recognize when surprising (i.e., emergent) phenomena occur and to be able to explain what is happening in the model, the modeler must be clear about every aspect of the model (Axelrod 2007). It is easier to be clear when the model is simple.

This section focuses on ABM as a methodology and details the process of conducting such investigations. In other words, it provides the series of steps that are followed to construct an ABM. Although presented in a sequence here, these steps are often iterative with the results of one step causing a reevaluation of an earlier step.

Building an ABM

The initial task is to identify a problem that needs solved, a theory that needs tested, or a question that needs answered (Abdou et al. 2012; Gilbert and Troitzsch 2005). For example, a researcher might want to test a theory of how gangs form. ABMs are also frequently constructed to investigate regularities in patterns of behavior observed at societal or macro levels (Abdou et al. 2012; Gilbert and Troitzsch 2005). One example involves the clustering evident in the spatial distributions of crime events. Several authors have used the ability of their models to replicate clustering as a by-product of the individual decisions of agents (Birks et al. 2012; Groff 2008).

The next task is to examine existing theories which are important to explaining the phenomena of interest. When building an ABM, it is necessary to systematically examine the specific components of theory that may be relevant and to attempt to define them as explicitly as possible based on existing research (Birks et al. 2008, 2012; Groff 2008). While models vary in how faithfully they represent reality, they typically operate on the principle that “simpler is better”; thus a primary goal of modelers is to try to assemble the most parsimonious model to answer a question. The degree to which the theory is represented in the model represents the structural validity of the model (An et al. 2005). Simulation models, in particular, start with simple models and then systematically add complexity to ensure that the dynamics are well understood before continuing (Gilbert and Troitzsch 2005). These two tasks provide the basis for the more programming-oriented ABM building steps.

At this point, the modeler is ready to create a conceptual model. This is usually a visual diagram that captures both the essential constructs and how they are related to one another. The types of agents to be included in the model are specified, as well as the environment. A model exploring routine activity theory would, at a minimum, need to have potential offender agents, target agents, and guardian agents (Groff 2007). One examining crime pattern theory would need to include activity spaces of offenders (Brantingham and Brantingham 2004).

Once a model has been specified, it is programmed. The constructs of the theory are formalized at this point so they can be coded in the computer program. In some cases, the constructs are formalized as clearly stated verbal guidelines that underlie the behavior of agents, their interactions with other agents, and their interaction with the environment. For example, a potential offender will not commit a crime if a police officer agent is present. In other cases, the definition of these constructs takes the form of mathematical equations for evaluation of specific situations an agent encounters during the course of a simulation. Where theory is not detailed enough for implementation or does not address an issue, empirical research is used to enhance the representation of behavior within the model. The programming to implement the model is typically done via a software package.

Random numbers are an important component of ABMs. They are used to represent uncertainty in the model. Random number generators (RNGs) are used to provide numbers that fit a statistical distribution (e.g., normal, Poisson, or uniform). The modeler chooses the distribution that reflects the assumption of the model. The seed, or beginning number for the RNG, produces a set of random numbers. Each time the same seed number is used, the RNG produces the same set of numbers. This critical property of RNGs is what enables experiments to be run in ABMs. If an assumption of the model is changed but the same seed or series of seeds is used in the experiment, everything else is held constant from one experiment to the next. Thus, the researcher knows any changes in outcome are due to the change in the model assumptions. Seeds can be systematically varied across a set of runs and the results from those runs averaged before being presented as model results. This ensures the outcomes are not dependent upon the numerical value of the seed.

RNGs are also used to compensate for the fuzzier areas of what is known about how a phenomena “works.” Returning to the example of exploring guardianship, we know bystanders in a situation act as informal guardians but we do know exactly how the presence of those individuals translates into potential risk as perceived by an offender, and we are not likely to be able to collect data on that aspect of offender decision-making. If we assume it is equally likely that each agent present in a situation represents one additional unit of guardianship, as it is that they represent five units of guardianship, we can use a uniform random number generator that ranges from 1 to 5. Since the distribution chosen is uniform, each time the RNG generates a new number it has an equal probability of being a 1, 2, 3, 4, or 5.

Verification, Validation, and Sensitivity Analysis

Three types of model testing are important to understanding the quality of the model results, verification, validation, and sensitivity analysis. “Model Verification is substantiating that the model is transformed from one form into another, as intended, with sufficient accuracy. Model verification deals with building the model right.” (Balci 1994, p. 121). This usually takes the form of debugging and logic-testing both during the programming of the model and during its testing to ensure the interactions produced by the code are as the theory intended. When ABMs include random numbers, without specifying the seed, no two model runs are alike and the only point of comparison is the distribution of results that the theory would suggest (Gilbert and Troitzsch 2005).

In contrast, “Model Validation is substantiating that the model, within its domain of applicability, behaves with satisfactory accuracy consistent with the study objectives. Model validation deals with building the right model.” (Balci 1994, p. 123). This aspect of model testing answers the question of how well the model represents the “target.” Model validation is analogous to the criteria of external validity used in traditional modeling (Gilbert and Troitzsch 2005). Validity in an ABM context is not an all or nothing proposition (Law and Kelton 1991). Rather, a model can have varying levels of validity relating to different properties of the target. There are several challenges in evaluating model validity of ABMs (Gilbert and Troitzsch 2005). First, both the target and the model have random components. Thus, the outcomes will vary across model runs. The critical question concerns how much the model varies from the expected statistical distribution of the outcomes. Second, many models are sensitive to the starting values of parameters (e.g., the ratio of motivated offenders to suitable targets in the model). Third, there may be problems with the “real” data rather than with the model results. This is an important issue especially when data sources are nonexistent (e.g., threshold of risk versus reward when deciding to commit a crime) or when they are unreliable (e.g., reported crime data only contains events reported by the public and those deemed to be crimes by the police officer taking the report) (Eck and Liu 2008a; Groff and Birks 2008).

Some researchers have compared the results of their simulations to widely recognized regularities in crime patterns, also known as “stylized facts” (Birks et al. 2012; Groff 2008). For example, crime patterns should exhibit (1) a high degree of clustering, (2) concentration of crime in relatively few places, (3) relatively few offenders responsible for most of the crime, (4) rather few victims accounting for most of the victimization, and (5) non-static patterns of crime over time. When results from a model share characteristics with empirical ones, their credibility increases (Eck and Liu 2004).

Sensitivity analysis addresses whether the parameter values chosen to represent the assumptions of the model affect the outcome of the model. For example, in a model of guardianship, if the number of people necessary to establish guardianship in a potential offender’s view is set to one person, will the model results change significantly if the parameter is changed to require two people, or three or four? Sensitivity issues can be tested by varying the parameter values and looking whether the overall results change. Given the large number of parameter values that are typically used in a model, only the parameters which are most likely to affect the results are usually investigated (Gilbert and Troitzsch 2005). Sensitivity to initial parameter settings and agent interaction rules are widely recognized limitations of ABMs that can only be partially mitigated through sensitivity testing (Couclelis 2002).

In sum, the strength of a model increases when rigorous verification is implemented throughout the programming process. It is improved further when validation tests reveal the model-produced findings share stylized characteristics with empirical findings. For example, since crime is clustered, crime events produced by a model should also be clustered. However, matching distributions is not a sufficient criterion for validation since a different model could also produce comparable patterns investigated (Gilbert and Troitzsch 2005). Establishing model credibility is an incremental process that involves multiple comparisons and is not an exact science.

Communication for Replication and Evaluation

One of the most challenging yet important stages of ABM is sharing the model with other researchers. This requires in-depth and complete description of the model which is difficult to accomplish in the space available in the typical journal. A template called the Overview, Design concepts, and Details (ODD) protocol has been developed for communicating models to facilitate replication and evaluation (Grimm and Railsback 2012). The first section of the ODD describes the focus of the model. The next section describes how the model implements ten core design elements including emergence, adaptation, objectives, learning, prediction, sensing, interaction, stochasticity, collectives, and observation. The final section contains all the information necessary to replicate the model. This protocol is becoming more widely used which should facilitate replication and evaluation of ABMs (Grimm and Railsback 2012).

When to Use an ABM

There are several circumstances in which ABMs are an appropriate method to use. When existing theories describe the mechanisms involved in criminal behavior (Eck and Liu 2008a), ABMs can be used to test the mechanisms in silica. For example, rational choice perspective (Clarke and Cornish 1985) describes how offenders make decisions whether to commit a crime based on situational characteristics. Agents can be created that use the logic of rational choice perspective to evaluate a situation. The modeler can examine what combination of situational characteristics translates into a decision to commit a crime.

When there are no data available to test a theory or describe the phenomena of interest (Eck and Liu 2008a), an ABM may be the only methodology available. For example, convergence is a core mechanism for crime events in routine activity theory (Cohen and Felson 1979). Data describing the movements of individuals prior to their involvement in a crime event are rarely available now and that is not likely to change (O’Sullivan 2004). The space-time movements of agents can be collected within an ABM and used to explore explanations for how offenders and victims converge in space-time.

In the same vein, ABMs can be used to explore the decision-making process related to crime. Crime events are the end result of decisions made by both offenders and victims that bring them together at the same place and time. However, data describing individual decisions prior to, during, and after the crime event are not available. Even if the data were collected, the dynamic, nonlinear quality of crime events makes them difficult to study using traditional statistical techniques. Agent-based modeling can accommodate individual agents with unique characteristics and decision-making capability.

When opportunities to conduct field experiments are challenging or even impossible, ABMs can be used as exploratory devices (Groff and Mazzerole 2008), for example, when ethical concerns preclude random assignment of people to treatment and control conditions or when it is not practical to vary the attribute of interest, such as changing the configuration of streets, which would be prohibitively expensive to do in a field trial but is easily done in an ABM. Although ABMs are not inherently experimental, they can be designed to systematically manipulate or randomly allocate a condition. The counterfactual or “null model” is simply the model without the “treatment” or behavior of interest turned on. The outcome from the null model can be compared to systematic manipulations of some aspect of agent behavior or the environment while literally holding all other aspects of the model constant. This provides a level of control nearly impossible to attain in field experiments. “While there is no substitute for field experimentation, simulation may be able to play a significant role in vetting and/or strengthening programs prior to their empirical testing.” (Groff and Mazzerole 2008, p. 189).

Along those lines, ABMs can be used to vet potentially expensive or invasive crime-prevention strategies prior to implementation (Groff and Mazzerole 2008). The combination of heterogeneous agents and complete control allows testing of a variety of crime-prevention programs and evaluation of outcomes for minimal cost as compared to field experiments. This makes them an excellent alternative when field experimentation would be prohibitively expensive or ethically difficult to mount (Eck and Liu 2008a). ABMs generally represent a complimentary research method to existing empirical ones.

Modeling the Process and Structure of Crime

ABMs have been used to study a variety of crime types including residential burglary, commercial robbery, street robbery, fraud, heroin use, drug markets, and crime in general (see both Eck and Liu 2008b; Groff and Birks 2008 for an overview). Most persuasively, these examples have illustrated how ABMs are able to model both the process and structure of events. In the case of crime events, ABMs can take into account the process that brings together the actors involved in crime. They can also represent the interactions that occur among those actors plus the decision-making process as the situation unfolds. ABMs can include structure in the sociological sense in terms of social influences on agent behavior. This is analogous to modeling the effects of unemployment, poverty, and education on crime. They can also incorporate the physical structure within which agents interact in terms of, for example, transportation and land use.

Future Directions and Challenges

ABM offers a promising alternative method for exploring how individual/micro-level actions over time produce group/macro-level phenomena. Although ABM has been around for over 30 years (40 years if theoretical/pen-and-paper models are included), significant challenges to using the methodology remain. Firstly, and most practically, the use of ABM as a methodology continues to be hampered by the steep learning curve required. Skills involved in the development of conceptual models for the most part follow standard model-building practice. Of course, modelers do have to learn to think using a bottom-up rather than a top-down paradigm, which can be difficult. But the greater challenge remains the need for programming skills to implement models in current software. Given the lack of experience of most social scientists with computer programming, this represents a significant hurdle to using ABM.

Secondly, validation of ABMs generally is challenging. Many of these challenges are widely recognized such as the need for standardized techniques for model building and for analyzing models and routine replication of models (Gilbert and Troitzsch 2005), as well as the fact that ABMs using different mechanisms can produce similar results.

In addition to these intrinsic challenges, the use of ABMs to examine crime has to depend on outcome data (i.e., crime statistics) with widely recognized shortcomings. Since crime data only reflect a subset of the crime that is committed, comparing the crime patterns produced by an ABM to empirical crime data is, in effect, comparing them to the subset of crime that is both reported to the police and for which the police take a report. Thus, it is difficult to tell whether the ABM’s crime pattern is incorrect or whether it actually reflects the “real” distribution (i.e., the full set) of crime committed (Eck and Liu 2008a; Groff and Birks 2008).

Despite these challenges, ABM’s use to investigate the potential crime prevention value of situational crime prevention techniques has great potential. The necessary foundation for agent-based modeling to contribute in evaluating crime-prevention strategies is the development of models that can produce realistic crime patterns. ABMs have traditionally emphasized offender behavior but there are other actors who have important roles in whether a crime occurs when the necessary elements converge in space and time (Eck and Liu 2008a). Decision-making by non-offenders such as potential victims, intimate handlers, and place managers are critical to understanding why crime occurs in one situation and not another (see Groff and Birks 2008 for additional suggestions). Given sufficiently robust models of why a particular crime occurs where it does, the possibilities for testing crime-prevention strategies in a relatively low-cost environment like an ABM would be limited only by the imagination of the researchers.

Related Entries

Crime Prevention Through Environmental Design

Integrating Rational Choice and Other Theories

Randomized Experiments in Criminology and Criminal Justice

Rational Choice Theory

Routine Activities Approach

Theories for Situational and Environmental Crime Prevention