Home / Agents / MESA

Simulate what happens next,
and prove how you got there.

Run populations of interacting agents — people moving neighbourhood, infection spreading through a network, a fleet finding equilibrium — and keep every run, every parameter and every seed so any result can be reproduced exactly.

Pure C agent-based modelling Runs beside AtomicDB Results stored as data Checkpoint & branch
Interactive · run a simulation

Same seed,
same run.

Set the parameters, run it, checkpoint at the interesting moment — then branch and try a different policy from an identical starting point. Reset with the same seed and you get the identical run back.

MESA · run registered
step0
happy—
mean similar—
seed42
stateregistered

Mild preferences produce sharp segregation anyway — the classic emergence result.

Stored with the run. Give it back and you get the same run, step for step.

Freeze the whole state at the interesting moment, before you intervene.

This is a browser reproduction of the model so you can drive it here. The real runs execute in the pure-C simulator beside the engine — and land in the database with their parameters, their seed and their metrics, queryable alongside the records they modelled.
🎲

Every run is reproducible

A run records its model, its parameters, its grid size and its random seed. Give those back and you get the same run again, step for step — because the random number generator is deterministic and stored with it.

a result nobody can reproduce is not a result
⏸️

Stop, save, resume, compare

A simulation can be checkpointed mid-flight and restored later — so you can branch a run at the interesting moment and try several interventions from an identical starting point.

compare policies, not coincidences
🗄️

The results are just data

Runs and their metrics land in the database like any other records — so you can query them, chart them, and join a simulated outcome directly against the real-world records it was modelling.

simulation and reality, side by side
Four classical models, ready to run

Each covers a
different kind of space

Each is a well-known benchmark of agent-based modelling, implemented natively.

Schelling segregation

Agents who want a modest share of similar neighbours relocate when unhappy — and mild preferences produce sharp segregation anyway.

grid · the classic emergence result

HeatBugs

Agents emit heat and move toward their preferred temperature while the field itself diffuses and cools — agents coupled through a medium.

diffusing field · indirect interaction

Flockers

Reynolds boids on a continuous plane: cohesion, avoidance, alignment and momentum produce flocking from three local rules.

continuous space · movement

Network contagion

Susceptible-infected-recovered spread across a network: infected nodes infect neighbours with a set probability, then recover.

network · the one that maps to YOUR graph
The life of a run

Stepped under your control,
not run to completion blindly

1

Create

Pick a model, set the parameters and the seed. The run is registered.

2

Step

Advance one tick or many. Read the field and the metrics after each one.

3

Checkpoint

Freeze the whole state at the interesting moment, before you intervene.

4

Restore & branch

Come back to that exact state and try a different policy from it.

5

Keep

The run and its metrics stay in the database, queryable alongside everything else.

Why simulate on top of your own database

A forecast you can
replay and challenge

Simulation usually happens somewhere else — a notebook, a modelling tool, a laptop — and the result arrives as a chart nobody can re-derive.

Here the run sits in the same store as the records it models, with the parameters and seed that produced it, so a forecast can be replayed, challenged and compared against what actually happened afterwards.

The contagion model runs on a network — and your data already is one.
Supply the real network →

Simulation elsewhere

  • A notebook on somebody's laptop
  • The seed was never written down
  • The result is a chart in a slide
  • Nobody can re-derive it six months later
  • It cannot be joined to the real outcome

Simulation on AtomicDB

  • The run is a record, in the same store
  • Model, parameters, grid and seed all kept
  • Metrics are rows you can query and chart
  • Replayable step for step, on demand
  • Joinable to what actually happened
Measured, not claimed

Read from the running simulator on live data.

0
classical models across four kinds of space
0
completed runs retained with their parameters
every
run stores its seed — all are reproducible
pause
checkpoint and restore mid-run, then branch
0
external modelling tools required
Where MESA sits

The population layer

JADE gives individual agents a way to negotiate, FIPA gives them a platform to be found on, and MESA runs them in numbers large enough for behaviour to emerge.