Technique · Simulations
Ant trails
A colony of ants lays scent on the way home with food and follows the scent of others, so busy roads grow between the nests and the food and fade when it runs out.
Ant trails is a simulation that evolves step by step. Every piece on Synapse Drip is made from a recipe that layers techniques like this one, and you can change any of it in the Studio.
Good to know
- Real ants lay chemical trails called pheromones, which evaporate within minutes, so a trail that is not renewed disappears and the colony does not get stuck on a road that no longer leads anywhere.
- A leafcutter ant colony can have millions of workers, and its foraging roads, kept clear of litter, can run for more than a hundred metres across a forest floor.
- Ants choose the way home by remembering the direction and distance they have walked, a kind of dead reckoning that desert ants carry out so accurately that they walk straight back to a nest hole a few millimetres wide.
- No ant knows the shape of the network: each follows two or three simple rules, and the roads, the shortcuts and the repairs all come from what the whole colony does to the scent.
- The French biologist Pierre-Paul Grassé coined the word stigmergy in 1959 while studying termites building nests: the insects never talk about the plan, they just react to what the others have already built.
- In 1990 Jean-Louis Deneubourg and colleagues gave Argentine ants a nest and food joined by two bridges, one twice as long as the other, and the colony usually ended up on the short one, because ants on the short bridge came back sooner and laid scent there faster.
- Marco Dorigo turned this into a way of solving problems in 1992: ant colony optimisation sends simulated ants round a network and lets good routes gather scent, and variations of it have been used to plan delivery rounds and the routing of data.
The mathematics
- The scent obeys S' = (1 - fade)(S + spread x (blur of S - S)) + what the ants lay: it is fed by the ants that use a road and drained by time, so a road survives only if enough ants keep using it.
- This is positive feedback: a road with more scent draws more ants, who add more scent. When two roads lead to the same food the one that is a little shorter gets the traffic back sooner and so gathers scent faster, and the colony settles on it; that is how the colony finds the shortest route without anyone measuring it.
- Each pile holds 1,500 pieces and each trip takes one, so once the colony has found a pile it is used up in tens of seconds and the colony then has to look for a new one, which is why the roads keep changing.
In art
- Ant roads from above look like river deltas, leaf veins, lightning and road maps at once, because all of them are networks that move something from many places to few and settle on economical shapes.
- The drawing is made of a single quantity, scent, shown as light; the ants are only the hands that draw it, which is the idea behind much of generative art.
More ways to use it
Related techniques
Reaction-diffusion · Cellular automata · Sandpile · Grain growth · Slime mould · Flocking boids · Attractor cloud · Elementary automaton