Stigmergy is a mechanism of spontaneous, indirect coordination between agents or actions, where the trace left in the environment by an action stimulates the performance of a subsequent action, by the same or a different agent. Stigmergy is a form of self-organization. It produces complex, apparently intelligent structures, without need for any planning, control, or even communication between the agents. As such it supports efficient collaboration between extremely simple agents, who lack any memory, intelligence or even awareness of each other.
Stigmergy was first observed in social insects. For example, ants exchange information by laying down pheromones on their way back to the nest when they have found food. In that way, they collectively develop a complex network of trails, connecting the nest in the most efficient way to the different food sources. Other eusocial creatures, such as termites, use pheromones to build their complex nests by following a simple decentralized rule set. Each insect scoops up a 'mudball' or similar material from its environment, invests the ball with pheromones, and deposits it on the ground. Termites are attracted to their nestmates' pheromones and are therefore more likely to drop their own mudballs near their neighbors'. Over time this leads to the construction of pillars, arches, tunnels and chambers.
The term is also employed in experimental research in robotics, multi-agent systems and communication in computer networks. In these fields there exist two types of stigmergy: active and passive. The first kind occurs when a robotic or otherwise intelligent "agent" alters its environment so as to affect the sensory input of another agent. The second occurs when an agent's action alters its environment such that the environmental changes made by a different agent are also modified. A typical example of active stigmergy is leaving behind artifacts for others to pick up or follow. An example of passive stigmergy is when agent-A tries to remove all artifacts from a container, while agent-B tries to fill the container completely.