Saramsha

No. 047  ·  2 November 2026

Shorter Paths Smell Stronger

Every ant that makes it home lays a trail of scent that fades within a minute or two. A short route gets walked, and re-marked, far more often per minute than a long one, so its scent never gets the chance to fade all the way. Watch a colony try two ways around a rock and settle on the shorter one, without a single ant ever comparing them.

Drag the food to move it. Paint or erase rock to change the routes.

About this piece

No ant knows the way. The colony finds it anyway.

An ant leaving the nest to search for food has no map and can see almost nothing. It wanders, mostly at random, nudged a little by whatever scent it happens to cross. The moment it finds food, it turns around and walks home — and on that walk back, it lays down a trail of pheromone behind it. The next ant to wander near that trail is pulled slightly toward the stronger scent, follows it some of the way to the food, and comes home laying its own trail on top. Every trip reinforces the trail a little, and every passing second fades it a little. That tug-of-war between reinforcement and evaporation is the entire mechanism, and it is enough.

It is also enough to solve a problem no individual ant ever perceives: which of two routes is shorter. If a colony's foragers happen to try both a long way and a short way around an obstacle, the short way gets a round trip finished — and its trail refreshed — more often per minute, simply because each trip takes less time. A faster-refreshed trail out-paces its own evaporation more easily than a slower one, so it keeps growing stronger while the long route's trail stays faint and keeps losing ground. Within a few minutes the colony is overwhelmingly using the shorter path, even though not one ant ever measured either route. This was shown for real with Argentine ants crossing a forked bridge to a sugar feeder, by Jean-Louis Deneubourg's lab in Brussels in 1989 — a true "double bridge" experiment, with real ants and a real stopwatch, that this page reconstructs with rocks and pixels instead.

Two scents, not one

This simulation actually tracks two separate scent fields, because a real ant needs both a way out and a way back. An ant that hasn't found food yet is searching, and it lays a trail toward home as it goes, fresh at first and fading as it wanders further from the nest. An ant carrying food is returning, and it lays a trail toward food the same way. Searching ants steer up the gradient of the food-scent; returning ants steer up the gradient of the home-scent. Each ant's entire "intelligence" is three sniffs ahead of its nose, compared against each other, plus a little randomness so it doesn't walk in a dead straight line forever. Nothing in the code ever compares one route's total length to another's — the shorter route simply wins the reinforcement race.

This exact idea escaped biology in 1992, when Marco Dorigo turned it into Ant Colony Optimization, a family of algorithms that still gets used today for problems like routing delivery trucks, laying out circuit boards, and finding paths through computer networks — anywhere a good-enough route needs to be found by trying many at once and reinforcing whichever keeps working.

The scent fields are two grids that every ant reads from and writes into; each cell keeps the freshest value written to it and loses a fixed fraction every frame, which is the trail-memory slider. Painting rock blocks ants and scent from crossing a cell; the default rock sits off-centre on purpose, so one way around it is shorter than the other. Dragging the food relocates it live — watch the old trail fade and a new one grow toward wherever it lands. ?warm= fast-forwards the simulation so a screenshot shows an established trail rather than an empty nest.