2.2.5: Model#

In a nutshell

You have met agents, the environment, time, and interactions one at a time. This page asks what happens when you put them together: what turns a pile of parts into a running model, and why does the assembled whole behave in ways that no single part was programmed to produce? This is where the payoff of agent-based modelling lives. Note the count as we go: a complete, runnable model needs six ingredients, not four, because the four components you have met must be paired with the initial conditions and parameters that set the model in motion.

2.2.5.1: Assembling a complete model#

When you combine the four elements we have discussed (agents, environment, time, and interactions) and give them a starting point, you create a complete agent-based model. An ABM is more than just the sum of its parts; it is a dynamic system in which:

Agents with their behaviours, goals, and adaptive capabilities interact within a structured Environment that provides context and constraints. These interactions occur over Time, following either discrete steps or continuous processes, and they create Patterns and Emergent behaviours that could not have been predicted from the individual components alone.

Two further ingredients turn these components into something you can actually run. The initial conditions fix the starting state of the agents and the environment (where everyone begins and in what configuration), and the parameters are the fixed values that tune agent behaviour and environmental properties (a speed limit, an infection rate, a neighbourhood size). Without a starting point and without values to control it, the four components describe a model but cannot yet be set in motion. The checklist below therefore asks for six ingredients, not four.

Learning Activity: Assemble a complete ABM
put the pieces of a complete agent-based model together.
A checklist of the six parts every agent-based model needs: an agent population, environment structure, interaction rules, temporal dynamics, initial conditions, and parameters.
Click each row to add that ingredient and fill the progress bar, and click a row again to remove one added by mistake.

A model is not any one of its parts but all of them working together, and only when every ingredient is in place does it become a running system. Having assembled the whole, we can now ask the more interesting question: why does that whole behave in ways no single part was told to.

2.2.5.2: From simple rules to complex outcomes#

Turn over each card to connect a simple rule with the kind of system-wide outcome it can help produce.

The short video below walks through this chain from the bottom up, showing how local agent rules accumulate into system-wide behaviour that no rule specifies on its own.

Agent-Based Modeling: What is Agent-Based Modeling?, Complexity Explorer.

The clearest demonstration of simple rules producing complex outcomes is Conway’s Game of Life. Each cell on the grid is either alive or dead, and its fate each step depends only on how many of its eight neighbours are alive. From those four local rules, nothing more, come shapes that glide across the grid, patterns that pulse forever, and even a pattern that manufactures an endless stream of others, none of which is written anywhere in the rules. The activity below lets you load a ready-made pattern or draw your own on the grid. Before you set it running, predict whether four rules that mention only a cell’s eight neighbours could ever produce a shape that moves across the grid on its own.

Learning Activity: Conway's Game of Life

watch complex patterns emerge from two simple neighbour rules.
Conway's Game of Life, a grid in which each cell lives or dies from one generation to the next according to four simple rules about its eight neighbours.
Load a pattern such as Glider or Gosper glider gun, or click cells on the grid to draw your own, then press Play to run the generations. While a pattern is moving, click an empty cell to make it alive and watch how this small disturbance changes or disrupts the pattern.
Patterns:
Generation: 0 Live cells: 0
The wonder. Nothing in the four rules mentions gliders, spaceships, or guns, yet they all appear. Some shapes travel steadily across the grid, others fall into a rhythm and oscillate forever, and a "gun" sits still while manufacturing an endless stream of gliders that sail away. None of that behaviour is written into the rules; it emerges entirely from local decisions about neighbours, which is emergence in its purest form. The Game of Life is in fact Turing-complete, meaning that with the right starting pattern it can compute anything a computer can compute.

2.2.5.3: Emergence and the micro/macro gap#

We first met emergence at the very start of this chapter, where it was called the whole reason for modelling this way. Now that the pieces are in place, we can state it precisely. Emergence is the heart of ABM: simple rules followed by many individuals produce patterns that no single agent was told to create. The distinction between the two levels is worth holding clearly, because the micro level is what you program while the macro level is what you hope to explain, and confusing the two is a common source of muddled thinking about models. In the activity below, each item is either an individual rule (micro) or the emergent pattern it gives rise to (macro). Sort each one, and look for the pairing in which a plain local rule on one side produces a surprising whole-system pattern on the other.

Learning Activity: Micro or macro?
tell micro-level rules apart from the macro patterns they produce.
Eight lines from an agent-based model, each either a simple rule that a single agent follows (the micro level) or the whole-system pattern that appears when many agents follow such rules (the macro level).
For every line, select either the Individual rule pill or the Emergent pattern pill, and once all eight are labelled press Check answers.

The lesson to carry away is that the gap between the simple rule you write and the pattern it produces is exactly what we mean by emergence, and studying that gap is much of what agent-based modelling is for.

Assembling the ingredients gives more than a description of a system: it gives a place to experiment safely, explore possibilities, and observe how individual behaviours shape collective outcomes. That is the essence of agent-based modelling, turning complexity into understanding through simulation.

You now have the full anatomy of a model. The next part of the chapter steps back from how ABMs are built to ask what they are good for and where they fall short, beginning with the benefits and limitations of agent-based modelling.

Key takeaways#

Key takeaways

  • A complete agent-based model brings its ingredients together: agents with their state and behaviour, an environment, time, and interactions, forming a system that can be run.

  • Running the assembled model turns a static description into a virtual laboratory in which collective outcomes can be observed as they arise from individual behaviour.

  • Emergence is central to the model: system-level patterns are produced by simple individual rules that no single agent was instructed to create.