Agent-based models

Agent-based models simulate the behaviour of multiple (typically many) individual agents that together form a larger society or population. These agents could be

  • persons in society, such as
    • producers and consumers in a market economy,
    • home owners in a neighbourhood,
    • car drivers in a traffic jam;
  • they could be animals in biology, such as
    • birds in a flock,
    • predators and prey in an ecosystem,
    • ants gathering food in their nest;
  • but they could even be inanimate objects such as
    • sediment in meandering sandbanks,
    • water filaments in soap bubbles,
    • and polarized atoms in magnetic material.
The behaviour of the individual agents can be very simplistic, yet the behaviour of the system (society/population) as a whole can be much more than the sum of its parts.

This phenomenon is called emergent behaviour. For instance,

  • the producers and consumers in a market might each just go for their individual gain, yet may (or may not) acheive market efficiency as a whole;
  • each individual car driver might just try to move as fast as they can, yet jam the whole system as a result;
  • individual birds may just choose their own path amidst their neighbours without any predetermined leader, yet end up flocking together behind a leader that happens to emerge from them;
  • each individual ant might just pick up twigs as they find them and leave them with others without predetermined plan, yet end up building one huge nest together;
  • the water molecules in soap bubbles just respond to the molecular forces between them, yet form soap bubbles of intricate shapes that minimize their total energy by reducing their total surface area;
  • each individual atom in a magnet produces a negligible magnetic field of its own, yet by aligning with their nearest neighbours they may end up forming strong magnets that can exert strong macroscopic forces.

We can distinguish a couple of different types of agent-based models. Typically individual agents are modeled with some variables describing their state and may be able to roam around through space over time. Both time and space can be either discrete or continuous (although in computer simulations, all modeling is discrete in theory, with sufficiently small discrete steps the model can behave as if it were continuous). Cellular automata are models in which agents can't move but are confined to a grid and both time and space are discrete, so they consist of a grid of cells, each of which can have a certain state, which may change in discrete steps over time due to some rules that determine the future state of the cell depending on its present state and that of its neighbours. Even if these rules are deterministic, this may lead to surprisingly rich dynamics; Conway's Game of Life is one of the earliest and most famous examples. The rules to update the state of cells may include random behaviour, in which case the model may be called a stochastic cellular automaton. Such systems are similar to interacting particle systems, except that the latter term is used to identify models in which time is continuous. Alternatively, agents may be connected through an arbitrary network of links instead of being placed on a regular grid, leading to dynamic network models. Typically though, general agent-based models would have agents roaming around freely in continuous space and either discrete or continuous time.

Under the links below, we describe some software packages that may be used to simulate agent-based models. Please note that this page is work in progress. More packages will be added over time.