Home▸Animals & Their World▸Army Ant Living Bridge — Bridge Position Optimizer (2D)

Army Ant Living Bridge — Bridge Position Optimizer (2D)

A 2D cost/benefit simulation of a self-assembling army-ant bridge: the ravine's crossing width changes with position, and the colony periodically re-samples where to link its bridge, trading fewer linked workers against a longer sideways detour — the same rule documented in real Eciton living bridges.

Animals & Their World2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-army-ant-living-bridge-bivouac ↗ Open standalone

Real army ant colonies (genus Eciton) build bridges out of their own linked bodies to cross gaps in the forest floor — and field studies have shown the bridges aren't static: the colony repositions them over time to shorten the crossing, balancing the labor cost of tying up workers in the span against the extra travel distance of reaching a shorter crossing point elsewhere. This 2D companion turns that trade-off into a readable simulation: the ravine's width changes along a horizontal offset axis, narrower on one side and wider on the other, so a shorter bridge at one position needs fewer linked ants but forces a longer sideways detour to reach it. Every few seconds the colony samples a nearby offset and keeps it only if it lowers total cost — occasionally accepting a slightly worse one, mirroring the stochastic exploration seen in the real insects — and the live panel tracks how many ants are locked into the bridge versus how many are free to forage. Toggling to night pulls the whole population into a clustering bivouac instead, since Eciton colonies build no permanent nest and rebuild themselves nightly out of their own bodies.

⚙ Under the hood

2D cost/benefit bridge-placement simulation: a ravine's crossing width varies with a horizontal offset, and the colony periodically samples nearby offsets, keeping whichever minimizes cost = antWeight × ants-needed-to-span + distanceWeight × |offset|, with occasional stochastic acceptance of a worse offset. Ants queue at the near bank until the bridge has enough linked workers, then cross; a night toggle switches the population into a growing bivouac cluster instead of marching.

army antsliving bridgebivouacself-assemblycost-benefit optimization2D

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

What did you find?

Add reproduction steps (optional)