Physarum Slime Mold: The Living Network Growing on Your Desktop
How Slime Mold Physarum simulates Jeff Jones' 2010 agent model in a compute shader — thousands of agents building organic vein networks in real time.
Physarum polycephalum is a slime mold — a single-celled organism that can grow to cover a square metre — and it has a trick that has bothered biologists and computer scientists for decades. Put food at two ends of a maze and it will find the shortest path connecting them. Not a path — the shortest one. It also replicates the Tokyo rail network if you put food sources at the major stations. No brain, no neurons, no algorithm running anywhere. Just chemistry.
The reason I built this wallpaper is that I find that deeply strange. The mechanism isn't intelligence — it's feedback. Trails reinforce themselves where they carry more flow; dead ends starve and retract. The network that survives is efficient not because anything planned it but because inefficient routes are automatically pruned away. It's optimisation without an optimiser.
I wanted to have that running in the background while I work.
What the simulation is actually doing
The model comes from a 2010 paper by Jeff Jones — it's about as clean as biological simulations get. You have thousands of agents (virtual organisms) moving around a 2D plane. Each agent:
- Deposits a chemical trail at its current position.
- Senses the trail concentration at three points ahead: ahead-left, straight ahead, and ahead-right.
- Steers toward whichever of the three has the highest concentration.
- Repeats — sixty times a second.
That's the whole model. Nothing else. But because every agent is depositing trails that other agents follow, and those other agents deposit more trail, you get autocatalytic feedback: the paths that form attract more agents, which reinforces the paths, which attracts more agents. The network that emerges isn't designed — it's the stable attractor state of ten thousand things all blindly following the same gradient.
The result looks like vascular tissue, or root systems, or the cosmic web of galaxy filaments. Apparently the universe has a type.
Slime Mold Physarum growing in real time. Browse the collection →
Running it in a compute shader
The catch is that the model only gets interesting at scale. A few hundred agents produce sparse, forgettable threads. You need tens of thousands for the network to feel dense and alive, and tens of thousands of agents all updating simultaneously is exactly the kind of embarrassingly parallel problem a compute shader is designed for.
A compute shader is a GPU program that doesn't draw anything — it just computes. In this case, each invocation handles one agent: read its position, sample the trail texture at three sensor positions, rotate, move, write a deposit back to the trail texture. The trail texture itself is processed in a second pass that applies diffusion and decay — spreading the signal slightly so nearby agents can smell it, then fading it so old paths don't accumulate forever.
The CPU's job is just to kick off those two passes each frame and stay out of the way. The actual agent math runs on the GPU, all agents simultaneously, which is why you can run fifty thousand of them without your fans spinning. I wrote up how the same CPU-vs-GPU principle works in how I got a particle flow field to run at near-zero CPU — same idea applies here.
What you can change
- Agent Count — fewer agents produce wispy, exploratory threads; more produce a dense vascular network. The interesting range is somewhere in the middle where you can still see individual paths competing.
- Sensor Angle — how wide each agent sweeps as it senses. Narrow angles produce straight, highway-like paths. Wide angles produce branching and loops.
- Decay Rate — how fast the trail fades. Slow decay accumulates a rich historical record of where the network has been. Fast decay keeps it minimal and always in motion.
I keep Agent Count moderate, Decay Rate on the faster side. The network is always slightly dissolving and rebuilding — it never settles into a static image, which is the point.
Have a look
The simulation starts from a random scatter of agents and self-organises into a network in about thirty seconds. Watching that happen from noise to structure is half the appeal.
Physarum Slime Mould

Generative biological morphogenesis capturing the hypnotic foraging intelligence of slime mould. Intricate capillary anastomoses dynamically bifurcate and stream nutrients through undulating cellular walls, radiating warm citrus amber and bioluminescent moss green tones.
Run this as a live wallpaper with Novaframe
Novaframe is the free desktop engine behind these wallpapers — real-time shaders rendered on your GPU, not video loops. Download it once, then apply anything from the catalogue in one click.
Frequently asked questions
Related articles
Voronoi Drift: How Computational Geometry Becomes a Living Wallpaper
A Voronoi diagram answers one question: which point are you closest to? Ask it a few thousand times per second with moving seeds and you get something that looks alive.
4 min readSilk Aurora: What It Takes to Make Light Feel Like Liquid on a Desktop
Silk Aurora's ribbons of teal and violet never tear, never z-fight, and never repeat. Here's how a single 2D fragment pass pulls that off.
4 min readLorenz Attractor: Chaos Theory Running Live on Your Desktop
The Lorenz Attractor wallpaper solves actual differential equations in real time. Here's why the butterfly wing never repeats — and why that's the whole point.
4 min read