Physarum: birth of a network
There is a living thing that solves mazes without a brain. Physarum polycephalum, a slime mould — a single giant cell, spread out like a fan, with no neuron and no nervous system. Place food at the two exits of a maze and let it explore: within hours it withdraws its mass from the dead ends and keeps a single strand, the shortest path between the two points (Nakagaki, 2000). Better still: feed it at the locations of the cities around Tokyo, and the vein network it weaves reproduces the topology of the Japanese rail network — a layout optimized by engineers, rediscovered by a cell with no plan (Tero et al., 2010).
How does a headless organism “compute” an efficient network? This experiment — LifeLabs’ fifth — rebuilds the barest possible version of the mechanism and watches it work. The exact command is on the run page, reproducible from seed 42.
A local rule, a shared field
No “intelligence” is written into the code — and the word earns its quotation marks. There are only 65,536 tiny agents, each reduced to a position and a heading, and a shared trail field, a 256×256 grid. At every step, all agents follow the same, purely local rule:
- sense: three sensors (ahead, ahead-left, ahead-right) sample the trail field a short distance away;
- turn toward the sensor reading the most trail;
- move one step in the new direction;
- deposit a little trail at the point reached.
Then the field lives its own life: it diffuses (each cell blends with its neighbours) and decays (10% evaporates every step). That’s all. No agent sees another agent; none knows the map; none has any memory beyond its current heading.
What links them is the field. An agent lays down trail; that trail attracts other agents which, in turn, lay down more; a slightly marked groove deepens, captures more traffic, strengthens further. Conversely, a trail no one uses evaporates. This mechanism — communicating by modifying the environment rather than by addressing one another — has a name: stigmergy. It’s what ants do with their pheromones. The network is never decided; it is the stable residue of a reinforcement and a forgetting that balance each other.
What this run shows
2,000 steps, 256×256 field, 65,536 agents, “ember” colormap. The vital signs tell the story better than any frozen image:
- the network contrast — the relative variability of the field, our measure of “how much the trail is concentrated into veins rather than spread out” — starts at 0.18 at step 10 and climbs to 0.50 by the end, nearly three times higher. The contrast is not in the initial seeding: it is produced by the dynamics.
- the coverage — the fraction of the field that is densely marked — settles at 0.14: the network is localized, neither empty nor flooded. The veins occupy a fraction of the plane; the rest is the void between them.
- the neighbour correlation reaches 0.999: adjacent cells look very much alike. That’s the signature of a contiguous structure — continuous veins, not a dusting of noise (a white-noise field would give a correlation near zero).
- the classifier, blind and automatic, decides:
network.
And above all, on the video, you can see the two acts of the story. At first, the freshly scattered agents cover everything with a dense, fine sleet, almost uniform. Then that sleet coarsens: trails gather, the fine mesh fuses into thicker veins, voids open between them, bright nodes appear at the junctions. The final pattern is a reticulated, honeycombed network — a lacework of filaments and cells that keeps slowly reorganizing, migrating and rewiring, without ever quite freezing. Nobody drew these veins; they are where reinforcement won out over evaporation.
A note on vocabulary
Saying this network “optimizes itself” calls for caution. Our turning rule is deterministic (each agent follows its strongest sensor), where Jones’ reference model (2010) adds a random turn — the same family of emergence, a deliberate choice for reproducibility. And our run doesn’t claim to solve a maze: it shows the shared substrate — the deposit / diffusion / evaporation loop that, in the real organism, underlies that maze-solving. What we can honestly observe is that a uniform local constraint is enough to make an extended, parsimonious transport structure emerge with no central plan. The word “intelligence” stays in quotes: there is no representation, no encoded goal — only local physics and a field that keeps a trace of the past.
The through-line
Parsimonious transport networks are everywhere: the veins of a leaf, the mycelium of a fungus linking the trees of a forest, our rail and road networks, right up to the layouts engineers refine to balance total cost against robustness. Physarum reaches comparable trade-offs with no engineer and no overview. That’s exactly what LifeLabs sets out to show: global organization that rises up from the local, with no one at the controls.
Try it yourself
The Physarum demo runs entirely in your browser, on the GPU (WebGPU). Watch the network emerge frame by frame; push the sensor angle or decay slider and you see the mesh tighten or dilate, the veins thicken or fray; reseed to start again from random agents and watch a completely different network weave itself. Nothing is pre-recorded: it’s the same local rule as above, recomputed every frame.
Open the full run page for the exact parameters, or the Physarum experiment page for context. Everything is reproducible from seed 42.