Math
Ant colony: trails and collective behaviour
Place food, interrupt a trail and watch a colony reorganise through local decisions.

Try this
Left-click the ground to place food or a small obstacle. Right-drag rotates; the wheel zooms. Cyan marks food trails; gold ants carry food, blue ants scout and violet ants work inside. Close-up shows the nest section; the oblique view looks down on the trails.
The model and its limits
A local-agent teaching model with 22 connected chambers and 34 curved tunnels. Workers travel on the same passage graph shown in the cutaway, carrying food to stores and visiting brood and queen chambers. The fixed nest and population are prescribed; digging, births and species-specific biology are not simulated.
Equations used in the module
Equations P(t + dt) = P(t) exp(-ln(2) dt / T) food_added + food_initial = food_outside + food_carried + food_stored + food_consumed


