All Articles

Stigmergy and The Soul of the Ant

When I was a kid, one of the books I read that stimulated my sense of awe and wonder in nature was “Die Siel van die Mier”, which in English is “The Soul of the Ant” — written by an important figure (I now realise) in ethology, Eugene Marais. I can still remember his descriptions of how magnificent a termite’s nest is, how comparatively small a termite is, and the questions he asked around how it was possible that such a stupendous, high structure with its intricate pathways and symmetries could be architected by these creatures.

Termite Mound by Razmataz

How did they communicate and agree on what to build and how to build it? How did they work together, and coordinate themselves?

I believe he attributed it to some invisible guiding force from the queen. Other people attribute it to some kind of innate intelligence. But another word describes it better: stigmergy.


Stigmergy refers to how an animal modifies its environment as part of some action or stimulus — and how that environment modification can in turn influence other animals.

So for example an ant might detect some food, and then secrete a pheromone trail back to the nest. The ant has modified the environment — and now other ants will magically start trundling to the food. Presumably ants have some simple, default mechanism of “follow the pheromone lad” kind of behaviour — it’s a simple behaviour, but it’s queued on an environmental modification.

From Theraulaz and Bonabeau

Another example is given in a paper by A Brief History of Stigmergy (PDF) by Theraulaz and Bonabeau. These poor wasps are trying to build a funnel, but at some point, just before they’re finished, a researcher creates a little hole near the top of the funnel (S1). That’s the same stimulus that drove the wasps to create the funnel in the first place — so what do they do? Well, they go and create another one at that spot.

Stigmergy and algorithms

The behaviour is deviously simply, very mechanical, very algorithmic — with a lovely feedback mechanism. That same paper has a nice analysis of how a particular species of wasp coordinates to create a hive. The algorithm is something like: create a new piece of comb at some location that has the most walls. This will result in a nice comb being constructed, instead of a straight line of cells.

I find a deep beauty here — in how evolution has led to these creatures using simple, local rules to create vast and complex structures and behaviour. The behaviour emerges from the simple algorithm. That got me thinking about boids.

Other Emergent Behaviours

One way I look at this stigmergy is that the complexity behind the physical object arose from the interactions of individual agents. The behaviours accreted a physical manifestation. I suspect boids are another example of this — except the physical manifestation is absent, or rather it’s temporal.

Have you ever seen birds flocking? Or the amazing wheeling of a school of fish. How is it coordinated? It turns out that individuals need to do very little, perhaps just obey three simple and localised rules: separation, alignment and cohesion. If they do, the behaviour of flocking simply emerges out of the group.

Craig Reynolds developed an artificial life program (called boids), which demonstrates these simple laws in action. Here’s a look at a simple animation based on the algorithm.

How marvellous is this reverse engineering? The amazing swirling, whirling and acrobatic displays of swarm birds and bats can be reduced to three simple, local rules — that if any one individual obeys, will result in the collective whole taking on an incredibly beautiful behaviour.

Stigmergy and culture

I wonder how we, humans, are affected by these kinds of things. What kind of traces do we leave in our environment that causes us to perform certain behaviours which may in turn lead to….?

That question makes me think of culture — which increasingly I realise is the source of much of what we do and how we think.

Perhaps another way of looking at culture is simply that of a stigmergic trail that we leave behind us.

Originally published on January 15, 2013.