Two bridges between a nest and a sugar pile. Ants choose a bridge by smelling pheromone, deposit more on the way and the colony converges on one path.
Runs many independent colonies headless with the current parameters and reports how often each bridge wins.
The science
Choice rule (Deneubourg 1990). An ant reaching the fork picks the short bridge with probability P_s = (k + c_s)^n / [(k + c_s)^n + (k + c_l)^n]. c is the pheromone amount on a bridge in units of one ant crossing; k sets how much scent is needed before it matters, n how sharply the choice follows it. The defaults k = 20, n = 2 are the textbook fit values - typical, not measured here.
Pheromone budget. Every ant deposits a total q = 1 while crossing, spread evenly along the bridge, and scent evaporates as dc/dt = -rho c with rho = ln2 / half-life. Because the short bridge is crossed faster, its scent builds up earlier, so its P_s rises, so more ants take it: positive feedback plus a small time advantage selects the short path.
Mean-field model. The blue curve is a separate deterministic re-implementation: dc_i/dt = -rho c_i + q Phi mean(P_i over the last T_i) with T_i = L_i / v and Phi = 2 lambda. It has no noise, so with equal bridges it stays at 50 %, while real colonies break the symmetry and lock on to one side.
Why r = 2 sometimes fails. Early on only a few ants have crossed; random fluctuations can make the long bridge look better and the feedback then locks it in. Small colonies and slow evaporation make this more likely, a large colony or fast evaporation less. Experiments with Argentine ants (Goss et al. 1989; Deneubourg et al. 1990) found the short branch winning in most but not all trials for a length ratio of 2 - a human should spot-check the exact fractions in the literature.
Simplifications. No collisions or U-turns, constant walking speed (with a small random spread), scent kept on the bridges only, ants removed on arrival and released at random (Poisson) at both ends. Ants are drawn about 1.6 times larger than real so they are visible; the 28 cm bridge is a lab-scale value. Leg motion is a simple rigid swing, not a real gait.
3D models, textures and wood grain were modelled and baked in Blender; physics, AI and UI run in Three.js r160.
Educational model. Times are simulated seconds; use the time-warp slider to speed up.