What is an Agent?
An agent is a computational entity with:
- A state — position, velocity, health, money, beliefs
- A set of rules — how it changes state based on what it senses
- A local perspective — it only know about its immediate neighbourhood
The key feature of agent-based models is that there is no central controller. No agent knows the global state. Patterns emerge purely from local interactions repeated thousands of times per second.
Emergence: When a collection of simple agents produces patterns or behaviours that none of the individual agents intended or "knows about", we call this emergent behaviour. It's one of the most profound ideas in modern science.
Classic Examples
Why Agent-Based Models Are Used in Science
Many real systems are too complex for equations — there's no closed-form mathematical description of how a city grows or how a pandemic spreads through a heterogeneous population. Agent-based models are used when:
- Individual differences matter (heterogeneous agents)
- History matters (path-dependent systems)
- Local interactions can't be easily aggregated
- You want to test policy interventions (vaccination, social distancing, subsidies)
The Limitation: Validation
The power of ABMs is also their danger. With enough agents and enough rules, almost any macro-level pattern can be reproduced. A good ABM doesn't just reproduce the observed pattern — it should also fail to reproduce patterns that don't exist, and predict new ones before they're observed. This is harder than it looks.
Try the Simulations
- Boids — the canonical flocking sim. Try disabling alignment and watch the flock break up.
- Ant Colony — block a path and observe the colony reroute.
- Disease Spread — set R₀ just above 1 vs just below 1 to see the epidemic threshold.
- Bank Run — adjust initial reserves and social contagion speed.
- Birds Flock — add wind and see how flocks adapt.
- Drone Swarm — consensus algorithms for decentralised target tracking.