What you're seeing
A few thousand identical particles wander a torus-shaped arena. None of them has a map, a goal, or any knowledge of the others. Each one does only this, over and over: it looks a short distance ahead — slightly to the left, straight on, and slightly to the right — at a chemical trail field, turns toward whichever sample is strongest, takes a step, and deposits a dab of its own trail where it lands. The trail field, meanwhile, blurs slightly and fades a little every tick. That is the entire system. Yet within seconds the dabs organize: faint wandering smears thicken into filaments, filaments fuse into channels, channels braid into a continuously rearranging vein-like network that pulses, prunes dead ends, and reroutes — the unmistakable look of a foraging slime mould, with no mould and no biology anywhere in the code.
The rule
This is Jeff Jones' agent model of Physarum polycephalum (2010). Two coupled layers update each step:
- Agents. Each agent has a position and a heading. It senses the trail at three points a fixed sensor distance ahead, offset left and right by the sensor angle. It rotates: if the front sample is strongest it goes straight; if a side is strongest it turns that way by the rotation angle; if neither side wins cleanly it makes a small random turn. Then it moves forward one step and deposits a fixed amount of trail at its new cell. Edges wrap, so the world is a seamless torus.
- Trail field. After every agent has deposited, the whole field diffuses (a 3×3 box blur that spreads each cell into its neighbors) and decays (multiplied by a factor just under one, so trail evaporates).
The feedback is the whole story. Deposit reinforces a path; diffusion lets nearby agents smell it; decay erases paths nobody is reinforcing. A track that happens to get a little traffic becomes easier to sense, which draws more traffic, which deposits more trail — while unused excursions quietly evaporate. This is pure stigmergy: coordination through marks left in a shared medium, never through direct communication. No agent has a map; the network is the shared memory.
Why it matters
The model is a vivid case of decentralized computation — a population with no brain and no central controller settling into structures that look engineered. The networks it grows are not arbitrary tangles: they trade off total length against connectivity and resilience, the same competing pressures that govern designed transport networks, and they do so with nothing but local sense-and-deposit arithmetic. Jones showed that by tuning a handful of parameters the same rule sweeps through a zoo of patterns — meshes, fine reticular networks, traveling lacework — and that the structures spontaneously reorganize toward more efficient layouts over time. It is a working illustration of a deep idea: that "computation" need not require a processor, and that a diffusing chemical plus a crowd of trail-followers can approximate the kind of optimization we normally hand to algorithms. The same agent-and-pheromone logic underlies ant-colony optimization and other nature-inspired methods for shortest-path and network-design problems.
In the wild
The simulation above is an agent caricature — Jones' algorithm — and it is honest to keep it separate from what the real organism does. Physarum polycephalum is a single giant amoeboid cell, a plasmodium that explores its surroundings with a pulsating tube network and retracts the tubes it isn't using. Real laboratory experiments — not this sim — established its surprising competence:
- Maze-solving. Nakagaki, Yamada and Tóth (2000) placed a plasmodium across a maze with food at two exits; the organism withdrew from dead ends and left a single connecting tube along the shortest path between the food sources.
- The Tokyo rail experiment. Tero, Takagi and colleagues (2010) laid oat-flake food sources in the geographic pattern of the cities around Tokyo. The mould grew a network connecting them whose efficiency, fault-tolerance, and total cost were comparable to the actual Tokyo rail network — and they distilled the behavior into a mathematical model of adaptive, biologically inspired network design.
So the lineage runs the other way from how it might appear: the living organism's documented feats came first, and Jones' agent model is a later abstraction that reproduces the style of network formation — the branching, fusing, and pruning — without simulating the cell's actual mechanics. Watching the sim approximate a transport network is suggestive, not a proof that the toy solves the same problems the organism does.
Try this
- Raise decay toward the top of its range: trail evaporates faster than agents can reinforce it, and the network thins to a few starved threads — or collapses entirely.
- Widen the sensor angle: agents survey a broader cone ahead, the veins coarsen, and the mesh opens into larger cells. Narrow it for fine, hairline reticulation.
- Shorten the sensor distance for tight, local braiding; lengthen it and the agents commit to long, sweeping channels.
- Drag across the canvas to deposit a blob of trail and watch nearby filaments bend toward it, then release — the temporary attractor heals away as decay erases it.
References
- Jones, J. (2010). "Characteristics of Pattern Formation and Evolution in Approximations of Physarum Transport Networks." Artificial Life 16(2), 127–153.
- Tero, A., Takagi, S., Saigusa, T., Ito, K., Bebber, D. P., Fricker, M. D., Yumiki, K., Kobayashi, R., Nakagaki, T. (2010). "Rules for Biologically Inspired Adaptive Network Design." Science 327(5964), 439–442.
- Nakagaki, T., Yamada, H., Tóth, Á. (2000). "Maze-solving by an amoeboid organism." Nature 407, 470.