Back to Simulations

Physarum Slime Mold Simulation

Emergent Network Formation

Watch the agents simulate an approximation of the paths traced by slime moulds to map efficient transport networks.

Number of Agents 4000
Total number of slime mold particles
Sensor Angle 45°
How wide the particles can 'see'
Sensor Distance 10
How far ahead each agent samples the trail
Rotation Angle 65°
How sharply agents turn toward or away from trails
Trail Decay 5
Higher values = faster trail fade, lower = longer-lasting trails
FPS: --

About This Simulation

This simulation models the behaviour of Physarum polycephalum a single-celled organism capable of solving complex network optimisation problems. It famously reproduced the Tokyo rail network when placed on a map with oats at major cities.

How It Works

Each agent follows three simple steps every frame:

Why Networks Emerge

Agents are drawn to existing trails and reinforce them by depositing their own. This positive feedback loop causes sparse random paths to consolidate into dense, branching networks, the same mechanism Physarum uses to build efficient transport networks between food sources in nature.

Try this: Lower the Trail Decay to near zero and watch the network slowly calcify. Raise the Rotation Angle to make agents erratic and see how the network structure breaks apart.

The Bigger Picture

Like boids, this simulation shows that sophisticated collective behaviour needs no central coordination. The slime mold has no brain, no map and no plan, it only utilises local rules operating on local information. Yet the outcome is a globally efficient network. Engineers now study Physarum to design better road and rail systems. It's also being studied as inspiration to build more robust, non-linear computing systems due to its ability to solve the Travelling Salesman Problem with astonishing efficiency.