Simulations and growth

Physarum

Hundreds of thousands of slime-mould agents follow their own trails, sense them ahead and turn toward the strongest scent — and weave a transport network.

  • GPU simulation
  • seamless tile
Open in the editor →

The yellow slime mould Physarum polycephalum is a single cell with countless nuclei. It has no brain, yet it solves mazes and links scraps of food with tubes as economical and robust as a well-planned railway. This layer grows such networks from hundreds of thousands of simple agents.

How it works

An agent is a point with a heading. On the trail map it sniffs three spots a distance d ahead: straight on and at an angle α to either side. It turns toward the strongest scent, takes a step and drops some trail of its own, while the map spreads out and evaporates.

F, L, R — trail ahead, left and right F above L and R → go straight F below L and R → turn ±β at random otherwise → turn β toward the larger step s forward, trail(x) += deposit trail ← (1 − decay)·mix(trail, blur, D)

It runs on positive feedback: where many agents have passed the scent is stronger, so more turn that way. Busy paths thicken and abandoned ones fade, just as the real mould widens its busiest tubes and abandons the rest. The shape of the network comes mostly from the angles and the sensor distance: in the “network” regime agents look 45° aside and turn by 22.5°, in “dendrites” they look only 15° aside but turn by 60°. The map is a torus, so the picture tiles seamlessly.

A bit of history

In 2000 the Japanese biologist Toshiyuki Nakagaki showed in Nature that the slime mould solves a maze: it withdraws from the dead ends and keeps one tube along the shortest route between two food sources. In 2010 Atsushi Tero, Nakagaki and colleagues put oat flakes where the cities around Tokyo stand and marked mountains and coast with light, which the mould avoids. The cell wove a network comparable to the real railway in total length, efficiency and resilience to broken links. Both studies won Ig Nobel Prizes, in 2008 and 2010. That year Jeff Jones published the agent model used here: no flow equations, just particles, scent and three rules.

What to tweak

  • “Regime” holds six tested sets of numbers: network, coral, rings, dendrites, web and spots.
  • “Start” set to “dish” grows the network inside a circle, like a Petri dish; “burst” sends every agent out from the centre.
  • “Species” at 2 or 3: each senses its own trail minus the others' and they split the field into territories.
  • In “custom”, raise “Decay” and faint veins vanish; a large “Deposit” saturates the map and the veins blur into ribbons.
  • Animated, the network keeps rebuilding itself; with the “Glow” effect the veins light up like neon.

Parameters

Regime
Ready-made behaviours; «custom» uses the sliders below network · coral · rings · dendrites · web · spots · custom
Detail
Trail-map cells across the short side: more makes finer veins
Population
Agents per trail-map cell: more makes a thicker, better connected network
Sensor angle
How far the side sensors look off the heading, degrees (custom regime)
Turn angle
How far an agent turns per step, degrees (custom regime)
Sensor distance
How far ahead an agent senses the trail, cells (custom regime)
Step
Distance an agent moves per step, cells (custom regime)
Deposit
Trail each agent leaves; a lot saturates the map and the veins blur (custom regime)
Decay
Share of the trail that evaporates each step (custom regime)
Diffusion
How much the trail spreads to neighbouring cells (custom regime)
Steps
Simulation steps before the picture is done
Species
Several species, each in its own colour, avoid each other's trails
Start
Where the agents begin: all over, in a round dish, in a ring, or in the centre running outward scatter · dish · ring · burst
Exposure
Brightness of faint trails