Ant Colony
Run a seeded ant colony simulation. Place food and obstacles, watch pheromone trails form, and pause or step through the four-state foraging model.
Still loading. If the tool doesn’t appear, reload this page.
About this tool
Ant Colony Simulator — Pheromone Trails, Food and Obstacles
Sunlit botanical terrarium ant-colony simulation: pheromone trails, berry groves, pebble obstacles and a live rule engine you can paint, pause and inspect.
Ant Colony is a simplified agent-based model, not a recording of real ants. Each simulated ant is in one of four states (explore, harvest, return or deflect), follows a stated sensing rule over a shared pheromone grid, and every number on screen is a measurement of that model. The run is seeded, so the same scenario and seed reproduce the same trail pattern. It runs entirely in your browser with no account and no network calls.
How to use Ant Colony
Select Foraging or another starting layout from the Scenario menu.
Choose Place Food or Pebble Obstacle, then paint on the terrarium to see how the colony responds.
Pause the simulation and press Step to advance one tick. Open Rules & Visuals to inspect the state counts and sensing rules.
Press Reset to restore the starting layout and seed, then repeat the run for comparison.
Why use Ant Colony
Seeded and repeatable
Mulberry32 seeding makes every scenario reproducible, and Reset restores the starting food and walls.
Inspectable rules
A rules drawer shows the four-state machine, the pheromone legend and a data table alongside the canvas.
Keyboard and touch
Space, S, R, 1 to 5, L, F and Esc drive the simulation; the canvas also supports arrow keys with Enter for painting.
Honest about the model
Metrics describe the simulation only and make no claim about real ant behaviour.
Common use cases
- Watch how a trail between a nest and a food source emerges from simple local rules.
- Block a route with pebbles and see how the model re-routes, or remove a food source and see the trail fade.
- Compare the foraging, bottleneck and maze scenarios, or save your own layout and load it later.
Frequently asked questions
Does this show how real ants behave?
No. It is a deliberately simplified model. Real colonies use more signals and more behaviours than this one.
Link to answerAre my saved scenarios kept?
Yes. Save stores your custom layout in this browser's local storage so it survives a reload; nothing is uploaded.
Link to answerWhy does Reset bring the food back?
Reset returns to the starting layout and seed of the current scenario so runs can be compared.
Link to answer