Agent-based modelling, explained
Agent-based modelling explains a system by building its individuals and letting the system’s behaviour follow from what they do, rather than by writing an equation over its averages. Here is the method, where it is used, what makes one credible, and what changes when the individuals can reason in words.
Last updated
Individuals first, totals second
Conventional modelling starts with a quantity: how some total moves — units sold against price, infections per week — solved forward. Agent-based modelling starts a level below that. You define what one individual is, what it perceives, and the rule it applies; the total becomes whatever many of them add up to.
Nothing at the top has to be written at the bottom. No individual contains the jam, the sorted map or the entrenched camps; those come out of local decisions interacting. Producing outcomes nobody encoded is the point; an average cannot, having discarded the variation that drives the answer.
- Agent
- One individual with its own state and its own rule.
- Interaction rule
- What an agent does with what it perceives — usually its neighbours only.
- Emergence
- A population-level pattern no agent was told to create.
Families of problem it suits
It suits questions where behaviour comes from differences between individuals and from who is next to whom:
- Residential sorting — households with mild preferences about their surroundings, deciding whether to move.
- Traffic and pedestrian flow — local rules about spacing and speed, applied to congestion, bottlenecks and emptying a venue.
- Epidemic spread — transmission across an explicit contact structure rather than one uniform mixing rate.
- Markets — traders with different beliefs and budgets, so price comes out of trading rather than being assumed.
- Opinion and influence — the family Ovriven’s simulation belongs to, taken apart in the opinion dynamics guide.
What makes one credible
A model of this kind can be arranged to output almost any shape, so the output is the wrong place to look. Scrutinise the mechanism: what an agent is, what it sees, and whether its rule survives being said in plain words.
Three habits separate a serious model from a persuasive one. Sensitivity: change a value you had to guess and see whether the conclusion holds. Retrodiction: point it at something already settled. Declaration: a model that never announces itself as one gets read as a measurement. Ovriven’s retrodiction covers its calibrated forecast, which combines the agent model with an independent AI judgment, rather than the agent model on its own: that forecast is back-tested against sixty real public events that had already resolved, its settings are frozen before the check, and most of those events were never examined while it was being designed — a check on the method, not a promise, as the limits guide spells out.
Rule-following agents and reasoning agents
Agents in the classical tradition are small: a few lines of arithmetic settle what one does. That austerity buys speed, inspectable steps and a history that can be replayed exactly. The cost is silence — such an agent has no account of itself.
AI-written reasoning gives an agent that account, and in Ovriven the account also has a say in what the agent does. The arithmetic still moves every agent at every step. At intervals during the run, a rotating subset of agents additionally works through its situation in words, and the decision each one reaches is folded back into its position within a fixed limit, so that reasoning does change where those agents end up. The words themselves are kept internal rather than displayed. What you can read is a separate channel: the Discussion stream, where agents send one another messages as the run unfolds. Treat those messages as commentary on the movement, not as its cause. The product-level framing sits in the introduction to agent simulation.
How the pieces fit together in Ovriven
- The stimulus is your description. Three separate readings are taken of it before the arithmetic starts: one picks out the cues the agents respond to, which drive the simulation; one recognises the kind of situation, which swaps the report’s vocabulary rather than its numbers; and one judges how divisive the situation is, which can keep opposing camps from merging.
- The population is heterogeneous by construction. Thousands of simulated people, thirty behavioural traits apiece, under a guard keeping every trait’s spread wide so the crowd cannot become copies of one agent.
- Interaction is local. Agents sit on a sparse social graph; each step one moves toward a credibility-weighted average of its neighbours, plus its own response to the cues.
- Influence is bounded. Where the neighbourhood an agent is wired to sits, on average, further from its own position than a set radius, that pull is tuned out rather than partly absorbed — the Hegselmann–Krause family — so a population can finish in camps, not on one number.
- The crowd can be held fixed. Pin it and the next run uses the identical people, so a difference between two versions of your text belongs to the text. Nothing maps age, gender, ethnicity or income to an opinion, and an automated check enforces it.
What the method cannot do
Two failure modes are worth carrying. The first is category confusion: a model of a mechanism never becomes a measurement of the world. A result describes where a simulated population settled — model output, not a probability, and a simulation-based estimate rather than a survey of any real population.
The second is that the description does the work. A plan described more generously than it deserves returns the reaction to the generous version, charted just as confidently.
A worked input
Our city bike-share is dropping fixed docking stations and moving to free-floating bikes that can be left anywhere inside a marked zone. The monthly membership fee stays the same. A bike left outside the zone incurs a small return charge. We announce it four weeks ahead in the app and by email. How do members and residents react?
Read the split first: one direction, or two camps of comparable size? Then the groups and the traits separating them, then the Discussion, to see whether their argument is one you recognise. Change the return charge, re-run on the pinned crowd, and the gap belongs to that sentence — the loop the customer simulation guide works through.