One giant cell, no nervous system
Physarum polycephalum is not a fungus, a plant or an animal — it is a plasmodial slime mold, a single cell that can grow to cover a dinner plate while containing millions of nuclei sharing one shared cytoplasm, with no cell walls dividing it internally. It has no brain, no nerves, no muscles in the animal sense. Yet when it forages, it does something that looks remarkably like planning: it spreads outward from a food source, explores in every direction, then withdraws from unproductive branches and thickens the ones that are working, until what remains is a lean, efficient network connecting every food source it has found.
Sense, move, deposit: the whole rule set
The computational model that reproduces this behaviour, developed by Jeff Jones in 2010, does not simulate the organism's internal biochemistry at all. Instead it represents Physarum as thousands of independent particle agents moving over a shared 2D trail field. Each agent follows three steps every tick:
1. SENSE -- read the trail field at three points ahead of the agent:
front-left, straight-ahead, front-right (a fixed sensor angle
and distance from the agent's current heading)
2. TURN -- rotate toward whichever sensor reads the highest trail value;
if straight-ahead is highest, keep going; if none stand out,
turn by a small random amount
3. MOVE + DEPOSIT -- step forward and drop trail chemical at the new
position; every cell of the field decays and diffuses a
little each tick
That is the entire algorithm. No agent knows where any food source is, how many other agents exist, or what shape the final network will take. The behaviour is stigmergic — coordination happens entirely through the shared environment, the trail field, rather than through direct communication. An agent that happens to wander toward a food source deposits trail there; nearby agents sense that trail and are drawn toward it too, creating a positive feedback loop that turns a single lucky path into a well-worn road, while paths nobody reinforces simply fade away as the field decays.
Why the network stays efficient, not just connected
A naive flood-fill would connect every food source too, but with a dense, wasteful tangle of paths. What makes the Physarum pattern interesting is that decay actively prunes redundant connections: a path that is only marginally shorter than an alternative accumulates trail slightly faster, wins more of the agent traffic, and the losing path decays away because nothing is reinforcing it anymore. The organism does not compute a shortest path in the graph-theoretic sense — it never sees the graph — but decay-versus-reinforcement acts as a distributed optimiser that converges toward something close to a minimum-cost tree, and it does so continuously and adaptively as food sources appear or disappear.
The Tokyo rail-network experiment
The most famous demonstration of this came from a 2010 study led by Atsushi Tero, published in Science. Researchers placed oat flakes — Physarum's preferred food — on a wet surface in the exact geographic layout of cities around Greater Tokyo, with the plasmodium starting at the position of central Tokyo. Over roughly a day, the slime mold grew a network connecting the oat flakes that closely mirrored the real Tokyo rail system: comparable total length, comparable transport efficiency, and comparable fault tolerance, meaning the network survived the simulated loss of individual links about as well as the real railway does. No engineer designed this network; it emerged from exactly the sense-turn-deposit loop described above, run on a substrate with no idea it was solving a transportation problem.
From biology to algorithm
Because the model is so cheap to simulate and produces organic, branching, fault-tolerant structures, the "Physarum algorithm" has been adopted well outside biology. It has been used to approximate solutions to network design and shortest-path problems, to generate procedural road and river networks in games and visualisation software, and as a physically-motivated alternative to more rigid graph algorithms whenever the goal is a network that degrades gracefully rather than one that is provably optimal but brittle. Its closest algorithmic relative is ant colony optimisation, which uses the same trail-based stigmergy but models discrete agents traversing a predefined graph rather than a continuous field — Physarum's version has no graph to begin with, it grows one.
Frequently asked questions
Is Physarum polycephalum actually intelligent?
It has no brain or nervous system at all -- it is a single giant cell. What looks like intelligence is emergent: local sensing-and-reinforcement rules, repeated across millions of points in its cytoplasm, integrate into network-level behaviour that approximates good engineering solutions. Researchers usually describe this as unconscious or distributed problem-solving rather than intelligence in the cognitive sense.
What was the Tokyo rail-network experiment?
In a 2010 study, researchers led by Atsushi Tero placed food sources on a map in the positions of Greater Tokyo's cities and let Physarum grow across it. The slime mold's resulting network closely resembled the actual Tokyo rail system in efficiency, fault tolerance and total length, despite the organism having no knowledge of transportation engineering -- it simply reinforced whatever trails already carried the most flow.
How is the Physarum algorithm different from ant colony optimisation?
Both use a shared, decaying trail field for indirect coordination, a mechanism called stigmergy. Ant colony optimisation typically models discrete ants moving along graph edges to solve a specific combinatorial problem such as the travelling salesman. The Physarum algorithm instead models a continuous field on a grid or a conductance network, growing and pruning connections based on simulated flow, which makes it a more direct fit for reconstructing physical, space-filling transport networks.
Try it live
Everything above runs in your browser — open Slime Mold Network (Physarum) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Slime Mold Network (Physarum) simulation