The sim finding three foods, recorded at its real speed. Play with the live sim
A slime mold that hunts for food, directed by me, coded by Grok.
A playable simulation of how Physarum, a slime mold, finds food. I built it to see how far Grok could go as a coding partner. I chose the behaviour, the look and the rules. Grok wrote the code, and I sent rounds back until it moved like the real thing.
The first build moved, but nothing held it together.
I watched a slime mold documentary and wondered if AI could recreate how it searches for food. I gave the question to Grok to see what it would build. It began as a one-shot creative lab, then narrowed to one organism and six questions: forage, maze, trail, network, pulse, split.
The forage card ran 48,000 agents on a standard model (Jones, 2010). Lots of motion. No body.

Three things I held through every round.
- Behaviour is the briefEach round was judged on what the mold does: when it rests, where it grows, what happens on contact.
- Slow and smoothReal slime mold never snaps, so nothing here does. No springs, no overshoot.
- The picture is the proofA passing check means little if the still shows the bug. I judged every round by looking at it.
Six rules that held to the last round
- Before R10Rest until scent touches the edgeThen grow from that point, on that side only. I asked twice before it held.
- Kept from R12Contact starts at the foodThe glow begins at the food and the tube thickens back to the body. Every later round had to keep this.
- R17No springs, no snapI said it three times. Round 15 still shipped springs. Round 17 took them out.
- R18The front stays ahead of the veinsWhile it searches, no tube pokes past the beaded edge.
- R18Growth roots in the moldNever in a food, even when several drop at once.
- R21Search follows the foodNew growth never fills the empty sides.
Agents made motion. Flow made a body.
The agent model draws trails. It can't hold a network. So the forage card moved to a flow model from the research on real slime mold: tubes that carry more flow get thicker, idle ones fade. Before any styling, I had Grok animate that one equation so I could watch it work.
Painted with a river, framed like a lab instrument.
The colours come from aerial photos of glacial rivers in Iceland. I didn't pick them one swatch at a time. I looked at each photo as a whole and at how much of the frame each colour takes. Most of it is dark ground, a smaller share is pale water, and only a little is warm. The sim keeps those shares: an umber field instead of pure black, pale ice-blue channels for the network, and ochre only where the flow is strongest.
What the rivers gave the sim
I read each photo as a whole first: how much of the frame is dark ground, how much is water, how little is warm. Then each share got a job in the sim. Under each photo, its shares; under all three, the sim. Hover a band to see where that colour sits. The figures were measured afterwards, for this page.
Left and middle: from the reference set, by Jan Erik Waider (from his series "Blue Veins") and Andre Ermolaev. Right: braided streams on the Katmai coast, Alaska, by the US National Park Service (public domain), added for this page for its top-down braiding. Each photo belongs to its photographer.
In the sim: the first river render
- Field #1A1214 · 94%
- Slate #677E8D · 2%
- Ice #93B4CC · 4%
- Ochre #E2B33C · 0.3%

The river version was all channels and no body, so I kept going.
A specimen on a lab monitor
I kept asking what this would look like in a sci-fi film. So the interface narrates the organism like an instrument: food dropped, scent detected, growing toward, contact, linked. Labels appear when their event fires. They never cover each other, the log or the controls.
It reacts to you, but only up close.
Hover near the edge and the blobs split and lean toward the cursor like iron filings. The pull stops about 80 px out and never moves a blob more than 22 px. Earlier versions stretched bubbles across the screen, and it took several rounds of notes to cut that back. Click the centre and a pulse runs through every vein, stronger on the wide ones.
Sound took three tries
- FirstA sci-fi clickOne sound, on label open. My note: too lazy, make it bassy, like a game menu.
- ShippedSounds from the organismA low hum when it smells food, a soft crackle for labels, one deep thump when you tap the centre. All made live in the browser.
- ExploredTwo more versionsOne layered recorded slime under the synth. One turned the network's flow into tones, mapped to published findings. Neither shipped.
Most of the direction was saying no.
Grok sent a build, I played with it, and I sent back what was wrong. When words weren't enough I marked up a screenshot, seven of them over the build. Here are three, each beside the round that answered it.



Finding the floor
After contact the searched web stays as a trace. How visible took five tries. I asked for 70 percent to see it, and a twelve-food network got too dense to read. Veins settled at 20 percent, lace at 30.
Two calls that cost rounds
- R18Trust the stillGrok's check passed and the picture still showed tubes past the front. The check measured an internal edge. I was looking at the drawn one. From then on a build had to pass the stills.
- R17Back to round 12Rounds 13 to 16 stacked search features on a build that had drifted, and the contact behaviour was getting harder to keep. Round 17 went back to the round 12 file and ported the search onto it.
Where Grok was strong, and where it needed me.
This began as a test of Grok. It held up well, and it still needed a hand. This is what the chat log shows.
What worked
- It repeated my notes back as a short listMy notes were long and dictated. Before building, Grok answered with five or six plain bullets of what would change. Twice that caught a misreading before any code was written.
- Every build came with what was still wrongEach delivery ended with its own list of rough spots.
- It checked the research and disagreedI asked how real slime mold builds its main vein. The answer began "You're half right."
- It left the choices to me"One choice is left for you: which way the thickening should visibly travel."
- It held builds backRound 18 passed its own checks. Grok still wouldn't send it, because the picture was wrong.
- Its bots handed work to each otherThe bot planning the X series asked the coding bot for the early material and had a full reply two minutes later.
Where I stepped in
- Rules had to be repeatedNo snapping, three times. Rest until scent, twice. Grow only from the mold, twice.
- New features broke old behaviourTwice the fix was to go back to an older build and port forward.
- Its checks measured the wrong thingThe round 18 check passed on an edge nobody could see.
- It overcorrectedRemove the thin fingers and the fan came back too wide. Fill the notches and the sides filled too.
- It went quietRuns were cut off or stalled, and I had to ask where things were.
- It couldn't see or hear the resultIt tested without a graphics card or speakers. The glow and the sound were mine to judge.
Shown as it happened, in 13 posts.
I wanted people to follow the build while it changed. Grok's first advice was to lead with the best frame and then rewind. I asked it to argue both sides, and we went progress first: open on the early experiment, show one change per post, keep the evidence in the replies.
The series ran on X from Nov 11 to Nov 30, 2026. Papers, footage credits and limits went in the replies. Where the sim didn't match the real clip, the post said so. The last post hands over the link and says the search still isn't right.
So I kept going after it. Each food now gets its own search the moment its scent arrives, and the mold goes after all of them at once.
What I gave up, and why.
Four choices, four costs
What I'd take into the next build.
- A red circle beats a paragraph.
My dictated notes ran long and Grok had to untangle them. The rounds that followed a marked-up screenshot fixed the thing I marked.
NextLabel every mark. The one area I left unlabelled, Grok guessed at.
- Write the rules down once.
I said no snapping three times in two days. At the end Grok compiled every standing rule into one file. That file should have existed from round one.
NextStart with the rules file, and have the AI read it before each round.
- Check what the eye sees.
A check that measures the wrong edge keeps passing. The stills caught what the numbers missed.
NextAgree which stills a round must show before any code changes.




