Experiment 05

Physarum

Tens of thousands of blind, memoryless agents that only know how to leave a trace and follow everyone else's — and yet a network of transport veins self-organizes before your eyes, with no blueprint ever drawing it.

What is Physarum?

Physarum polycephalum is a single-celled slime mould known for solving mazes and approximating near-optimal transport networks — with no neuron, no brain. LifeLabs does not simulate its biology: it uses the agent-based model proposed by Jeff Jones (2010), an algorithmic abstraction of the same behaviour. Tens of thousands of agents move across a grid: each one advances along a heading, deposits a pheromone trace where it stands, then samples the pheromone field ahead of it to steer its next step — turning toward whichever direction is most marked, or drifting slightly at random otherwise.

The pheromone field the agents deposit diffuses and fades at every step (decay), exactly as LifeLabs' shared substrate already does for Lenia or Gray-Scott. No agent knows where the others are, remembers its own past, or perceives the network's overall structure: each one only sees a small neighbourhood of the shared pheromone map, and responds to it with the same local rule — move, deposit, sense, turn.

Why this is emergence — a network, not a brain

In Lenia, emergence produces a mobile shape; in Gray-Scott, a static spatial pattern. Here it produces a NETWORK: individual traces, laid down and reinforced by repeated agent traffic, join into filaments that branch, connect to one another, then get pruned — lightly used paths evaporate, heavily used paths thicken and draw in more agents. This is stigmergy: indirect coordination, where agents communicate only by altering a shared environment that other agents later perceive, without ever exchanging a message or seeing one another.

There is no map of the final network anywhere in the code, and no conductor agent: every individual applies a purely local, identical rule — deposit, follow, turn — at every simulation step. The word "intelligence", sometimes used for Physarum in biology, should therefore be handled carefully: there is no brain planning ahead, only a repeated local rule and a shared field that accumulates the system's collective memory — the structure that results is written nowhere, but it is not deliberate either.

Pilot

Pilot the network

An interactive demo runs entirely in your browser, on WebGPU: watch tens of thousands of agents weave a network live, tune the deposit and decay parameters, or paint obstacles to see the network reroute around them.

Open the interactive demo

The vital signs we measure

Each run records five time series, computed at regular intervals during the simulation, which serve as "vital signs" for the observed network:

Network contrast
the pheromone field's standard deviation relative to its mean — near zero on a diffuse, uniform field, it climbs once veins that are clearly denser than the background stand out.
Coverage
the fraction of cells whose trace exceeds a threshold relative to the field's mean — the share of the grid occupied by the network's dense veins, rather than the diffuse background.
Neighbour correlation
the correlation between each cell and its four immediate neighbours — near zero for incoherent spatial noise, it climbs once traces organize into continuous filaments rather than isolated points.
Mean trail
the mean of the pheromone field across the whole grid — a value that rises while agents deposit more than evaporates, then settles once deposit and decay balance out.
Spatial entropy
the Shannon entropy of the normalized pheromone field's histogram — high on a diffuse, disordered field, it falls once the pheromone mass concentrates into a small number of well-defined veins.

Vital signs — latest run

Network contrast0.50
Coverage0.14
Neighbour correlation1.00
Mean trail45.0
Spatial entropy2.25 bits

Results

First public run — 2,000 steps, 65,536 agents, seed 42. The trail field starts as a dense, near-uniform sleet, then coarsens: network contrast climbs from ≈ 0.18 (step 10) to ≈ 0.50 — nearly threefold —, coverage settles around 0.14 (a localized network, neither empty nor flooded) and neighbour correlation reaches 0.999, the signature of continuous veins rather than noise. The classifier labels the result "network". On the video you can see a reticulated, honeycombed network: trail veins that branch, connect and slowly rewire, without ever quite freezing — emerged from a purely local rule (deposit, sense, turn) and a shared, evaporating field, with no overall plan. The interactive demo lets you explore the regimes live.