Home▸Animals & Their World▸Ant Colony

Ant Colony Shortest-Path Race (2D)

Top-down ant colony simulation: ants shuttle between a fixed nest and food source around a single obstacle, laying a pheromone trail that evaporates over time, while a live top-route-vs-bottom-route bar shows the shorter path winning through stigmergy alone.

Animals & Their World2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-3d-ant-colony ↗ Open standalone

This 2D companion runs the same stigmergic mechanic as the 3D ant colony scene — a fixed nest, a fixed food source and a single obstacle between them — but drawn top-down on a plain canvas instead of an orbiting 3D camera. Ants leave the nest, wander toward whichever ground smells most of pheromone, and lay a trail only on the way back once they are carrying food; the trail evaporates every frame, so only the route enough ants keep re-walking survives. Because the obstacle is asymmetric, one detour is shorter than the other, and the live top-route-vs-bottom-route bar shows the colony committing to the shorter one with no leader and no map — the same shortest-path emergence the 3D scene shows, reduced to two numbers you can actually watch converge.

⚙ Under the hood

Top-down 2D ant colony simulation where ants shuttle between a fixed nest and food source around a single obstacle, laying an evaporating pheromone trail whose stigmergic feedback lets the shortest route win a live top-vs-bottom race.

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)