This is the classic stigmergy mechanism behind ant-colony-optimization algorithms, isolated from pathfinding or 3D scenery: three fixed routes connect the nest to a food source, each with its own physical length. Every ant walks a route at the same speed, so the round-trip time is proportional to route length — ants on a short route complete more crossings per minute than ants on a long one, purely as a consequence of geometry.
Each pheromone channel decays exponentially and independently:
C(t) = C₀ · e^(−k·t)
Every time an ant finishes crossing a route (arriving at either end) it deposits a fixed quantity of pheromone on that route, regardless of the route's length. Because more crossings happen per unit time on the shorter route, pheromone accumulates there faster than evaporation can remove it, while the longer routes' trails decay away. The next ant leaving the nest (or the food) chooses a route with probability weighted by relative pheromone concentration raised to the sensitivity exponent α:
P(route i) = C_i^α / Σⱼ C_j^α
Higher α makes ants follow the strongest trail more rigidly (faster, more brittle convergence); lower α keeps more ants exploring. This feedback loop — deposit, decay, biased re-choice — is exactly the algorithm behind Ant Colony Optimization; no ant ever compares route lengths directly, the colony "computes" the shortest path collectively.
- Trail glow — line thickness and brightness show live pheromone concentration per route.
- Dominant route share — fraction of the last 40 crossings that used the currently-strongest route.
- Convergence time — simulated time until that share first stays above 85%, i.e. when the colony has effectively locked onto one route.