Agent-based simulations focus on understanding the interaction of several individual units. Instead of focusing on system flows, they work at a lower level of analysis and modelling. The simulation rules describe how an individual actor would behave in a particular situation. Instead of focusing on the flow of cat pictures to the social media news feed, the focus would be on each individualâs posting activities. The amount of social media content on cats is an aggregate of each friendâs sharing decisions. This is the main principle of agent-based simulations: connecting individualsâ behaviour and state to a wider aggregate level for analysis.
Individual agents and rules that define their actions are the main focus during agent-based simulations. Often the agents are individuals as part of the society, but they could also be other entities like companies or countries depending on the research question under focus. There is some flexibility in terms of the rules in simulation models. They can be rules without context (like aging agent one year per step), but they are rarely in the main interest of the modelling activity. Rather, an agent-based model can be more contextual and consider the potential interactions or other agents in the system. In many cases, agents are given a location on a grid format, and in these cases, the behaviour can depend on neighbourhoods and their actions. Alternatively, instead of a grid layout, agents can be laid in a network formation, defining neighbours as other agents with whom the agent is currently connected (for examples and discussion, see Macy and Willer, 2002). This gives more freedom for sociological imagination. The Schelling (1971) study of neighbourhood segregation is one early example of an agent-based simulation approach, and Code Example 6.2 illustrates in more detail how this process may look at the code level. The code checks each neighbour agent and identifies their colour. If the number of colours is higher than the set threshold limit, then the agent will move. The behaviour of the agent is defined in relation to its neighbours, and the focus is to understand how such rules impact the wider system (illustrated in Figure 6.1). Once the rules are defined and coded, a simulation is run, and the time is executed.
An agent-based simulation approach uses highly complex models and focuses on understanding how environments and interactions between agents impact the phenomena under study. As the focus of the simulation is on several agents, the model informs us how agents may influence and be influenced by each other. Even when this gives a powerful approach to understand system-wide changes, rules for each agent can be rather simple. This allows scholars to describe complex aggregate phenomena and emergence via these simple rules and behaviours at the individual level. Furthermore, agents can have `memory' of their previous actions and impacts on the environments, allowing agents to learn. For example, in a cooperation game an agent can understand the previous strategy of its opponents and, based on those, optimise their action: do they tit (co-operate) or tat (defect). This makes agent-based simulations an interesting tool for thought experiments (Macy and Willer, 2002).
These experiments include how Epstein (2002) examined civil violence based on citizens' attributes like hardship, legitimacy and risk aversion. (So, each agent had individual levels of these attributes.) Risk aversion was then connected to the number of cops present in the environment. He then moves to analyse the small incremental changes in all these parameters and how they impact the likelihood of civic unrest. Based on this, he is able to articulate the impacts of various parameters in the model to civic unrest phenomena. For example, he concludes:
With high legitimacy (mutual perception by each ethnic group of the otherâs right to exist), peaceful coexistence between ethnic groups is observed; no peacekeepers are needed. However, if the force density is held at zero, and legitimacy is reduced (to 0.8), local episodes of ethnic cleansing are seen, leading to surrounded enclaves of victims, and ultimately to the annihilation of one group by the other. With early intervention on a sufficient scale, this process can be stopped. Safe havens emerge. With high cop density from the outset, the same level of legitimacy (0.8) produces a stable society plagued by endemic ethnic violence. If cops are suddenly removed, there is reversion to competitive exclusion and genocide (Epstein, 2002, 7250).
Thanks to their flexibility, agent-based simulations like the ones above have been used in various disciplines, as they are a methodology to understand how agents behave when interacting. Reviews in sociology (Macy and Willer, 2002), political science (de Marchi and Page, 2014), the study of social dilemmas (Gotts et al., 2003) and innovation diffusion processes (Kiesling et al., 2012) demonstrate their diversity of use within social science. Even in one discipline, many different areas of research and theoretical perspectives have been used to engage with the challenge of simulation models. As noted by de Marchi and Page (2014, 3):
Many of the topics studied by political scientists-political participation, social movements, terrorism, economic regulation, cooperation, and alliancesâinvolve interactions among diverse entities that adapt their behaviour over time.