A single-celled organism that solves mazes, designs efficient networks, and approximates the Tokyo rail system.
Physarum polycephalum is a brainless single-celled slime mold that oozes across the forest floor — and solves optimization problems an engineer would respect.
The mechanism: extend tubes in all directions; tubes connecting food sources carry flow; flow thickens tubes; unused tubes shrink. After hours, what remains is a near-optimal transport network from local feedback alone.
The simulation models Physarum with thousands of agents. Each deposits chemical trail, senses concentration ahead, and turns toward stronger trails — the same logic as cytoplasmic streaming. Agents communicate only through the shared chemical field.
The result is branching, vein-like patterns. High sensor angle spreads agents out; low decay produces thicker veins.
Figure 1. Physarum agent model. Thousands of agents deposit trail, sense ahead, and turn toward stronger concentrations. The collective self-organizes into vein-like transport networks with no central control.
Tendrils merge where they meet. Trails fade without fresh deposit and thicken with traffic — the same dynamics shaping real Physarum tubes.
Nakagaki (2000) placed Physarum in a maze with food at entrance and exit. The slime first filled every corridor, then withdrew from dead ends and redundant paths, leaving a single tube along the shortest route.
A default barrier is shown — slime is already growing around it. Press Reset to clear, then drag to draw walls and switch to "Place food" to add your own.
Figure 2. Two food sources separated by a vertical wall. The slime fills available space, then prunes back to the shortest path that wraps around the barrier. No graph search — just reinforcement and decay.
The mechanism is flow-based optimization. Chemical accumulates near food, creating a gradient that pulls agents in. Agents traveling between the two food sources reinforce the connecting path; dead-end agents get no signal and decay.
With multiple targets, the slime grows to connect them all. The result isn't a minimum spanning tree but a compromise between length and fault tolerance.
An MST connects all nodes with the least total wire, but cutting any edge disconnects it. The slime adds extra connections, producing cycles that keep the network connected if one tube fails.
The Tokyo preset is loaded by default — slime is connecting eight Kanto-region rail hubs. Press Reset to clear, then click to place your own 5-8 cities and press Start.
Figure 3. Place cities and let the slime mold connect them. Toggle the MST overlay (blue dashed lines) to compare. The slime's network often includes redundant edges for robustness.
The slime knows no graph theory. The growth physics produces a trade-off: short paths carry more flow, more flow thickens tubes, but flow also distributes across parallel paths for redundancy. The result is a network like one a transport engineer might design.
In 2010, researchers placed oat flakes at locations matching Tokyo's major rail stations. The slime mold produced a network strikingly similar to the actual Tokyo rail system, achieving comparable efficiency and fault tolerance. A brainless organism, given the same constraints, converged on the same solution as decades of human engineering.