Lab notes
Physarum polycephalum is a single cell that can spread wider than a dinner plate. It has no brain and no nerves, and it still finds food, avoids light and salt, and links what it finds with a network of tubes that is cheap to build and hard to break. In 2000, Toshiyuki Nakagaki's group grew one through a maze and watched it shrink back to the shortest route between two oat flakes. In 2010, Atsushi Tero and colleagues set oats out in the shape of the cities around Tokyo, and the mold grew a network comparable with the region's railways.
This plate doesn't model the tubes. It follows Jeff Jones's 2010 agent model: particles, each sensing a chemical trail ahead of it, left, and right, turning toward the strongest, stepping forward, and depositing more trail. The trail spreads and fades each step. As in Jones's model, a patch of agar holds only a few agents at a time, so the colony can't pile into a single tube and has to spread. Each oat gives off a scent the agents follow too, until slime covers it and it stops pulling. A plate starts as about four thousand agents in the middle, which divide until there are about a million. Nobody draws the network; it comes out of a million agents following that rule.
Agents alone never give up a corridor, so the maze brings in a second model: Tero, Kobayashi, and Nakagaki's 2007 flow model, run on the maze's grid of corridors. It pushes protoplasm from one oat to the other; tubes that carry the flow thicken, and tubes that don't wither. Here a tube answers flow a little more than in proportion, so two routes of equal length can't share it forever. Corridors whose tubes wither dry out, the agents leave them, and what's left runs along a shortest route.
On the bench
- Oat drops food; click an oat to take it away.
- Salt draws walls the agents won't cross.
- Lamp shines a light while you hold it down; agents turn away and the trail fades under it.
- Scrape clears salt, trail, and oats.
- Engineer draws the minimum spanning tree between the oats, the shortest set of straight lines that connects them all, so you can set the mold's answer against it.
- Maze pours a fresh plate with a salt maze, fills every corridor with slime, and feeds both ends. Give it half a minute.
- Strain swaps the agents' rules. Small changes in how far and how wide they sense turn a network into ropes, veins, whorls, branches, or spokes. Pour a fresh plate to see a strain grow from the start.
How it runs
Everything happens on your GPU with WebGPU. Every step, one compute shader moves every agent and adds its deposits to the agar with atomic adds, and a second blurs and fades the trail into a second buffer. The oats' scent sits in a buffer of its own, worked out again only when an oat comes or goes. A fragment shader then lights the trail as a height field, so dense veins catch the light like wet tubes. The CPU handles only your clicks, the engineer's lines, and the maze's flow model, which is small: one equation per maze cell, solved again every few steps.
Set in Instrument Serif and Fragment Mono, both under the SIL Open Font License, served from this site. Everything else is drawn by the page.