← back to journal

Mazes Don't Finish

2026-10-07 · Kit Wickham

Gray-Scott is two imaginary chemicals on a grid. One, U, is fed in everywhere at a steady rate. The other, V, eats U to make more of itself, and is removed at its own steady rate. Both spread to their neighbours, U twice as fast as V. That's the whole model: two lines of arithmetic per cell, and two knobs, the feed rate F and the kill rate k. Depending on the knobs, it grows spots, mazes, coral, worms and things that look like cells dividing. It's the standard example of how patterns like a leopard's spots could come out of plain chemistry.

Most pictures of it are still images, so I assumed the patterns settle. I wrote one, swept the knobs to map what each setting makes, and then checked whether the patterns ever stop. Mostly they don't.

Live · F · k · step 0. Drag to paint.
Map of the pattern each setting settles into: feed rate F up the side, kill rate k along the bottom.
Map · k left to right, F bottom to top. Click to move there.

The map

I ran 1,845 settings (45 feed rates × 41 kill rates, the region where the interesting things live), each from three different random starts, on a 128×128 grid that wraps around at the edges, for 40,000 steps each. The map in the widget is one tile per setting: what the first start looked like at the end.

Most of the map is boring. At 31% of settings nothing survives: V dies out and the grid goes back to plain U. At 53%, V takes over everywhere in an even wash, with no pattern. Only 16% make a pattern at all, in a thin curved band between those two. Every famous picture comes from that band.

The start mostly doesn't matter. All three starts landed in the same kind of pattern (spots, holes, stripes, or nothing) at 97% of settings. Within the patterned band, though, that drops to 83%: near the edges of the band, one start makes stripes and another makes spots.

They don't stop

To see whether a pattern had finished, I counted how many cells flip between "has V" and "hasn't" over the last 1,000 steps. A finished pattern scores zero. At step 40,000, 68% of the patterned runs were still flipping more than 1% of the grid every 1,000 steps.

Maybe 40,000 steps just wasn't long enough. So I took every patterned setting (first start only) and ran it to 200,000 steps, five times longer, then compared the grid across two more windows of 10,000 steps each.

At 200,000 stepsSpotsHolesStripes and mazesAll
Stopped748486 (30%)
Sliding as a whole222832 (11%)
Still rearranging681091169 (59%)

287 settings still had a pattern at 200,000 steps (7 of the original 294 had died out or washed over by then). "Stopped" means the average cell's V changed by less than 0.002 over 10,000 steps, in both windows (V runs from 0 to about 0.4).

Spots are the only thing that reliably settles, and only about half of them do. The rest are mostly spots that keep splitting and dying, the chaotic churn at the low-feed end of the band. Stripes and mazes almost never finish: 4 of 123.

I followed three of them a million steps, 25 times longer than the map. None stopped. In the last 10,000 steps the maze still flipped 1.6% of its cells, the coral 5.7% and the holes 12%. The maze is the slowest: it's mostly locked in, and the changes are small and local. The coral and holes keep moving much more.

The whole pattern slides

The holes surprised me. Watching two frames 8,000 steps apart, the pattern looked almost unchanged, yet 12% of the cells had flipped. So I tested a different idea: maybe it's the same pattern, moved. I tried every small shift of the earlier frame and kept the one that best matched the later frame. Shifted one pixel left, the earlier frame accounted for 73% of the difference. Over longer gaps it got cleaner: with 20,000 steps between frames, a single shift explained 93% of it.

The whole pattern was gliding across the grid as one rigid thing, about one pixel every 6,500 to 9,000 steps depending on the start. Nothing in the model points in any direction, so I checked two things that would make it fake:

So it's real. The pattern starts out symmetric, the random start tips it slightly one way, and it keeps going. Across the map, 32 settings glide like this, nearly all of them in the worm-and-stripe region at the high-kill side of the band. The "sliding worms" preset is one. Watch the worm tips.

One caveat that matters. On a grid four times the area (256×256), the same settings still move, but not as one piece. Patches of stripes facing different ways each crawl their own way, and the best single shift explains only about a third of the change (in both settings I tried). On the small grid, which wraps around, a single patch fills everything, so the whole thing can slide. "The pattern glides" is partly a fact about the grid's size. "The stripes crawl" isn't.

What I take from it

A still picture of Gray-Scott is a frame from a film, and for most of the map the film doesn't end. The usual names for the regions (spots, mazes, coral, worms) describe what the frame looks like. They don't say whether it's moving. Two settings a hair apart can look the same and be completely different: one finished, one sliding at a steady speed forever.

The breathing holes preset is a fourth kind of motion my sliding test can't see: the pattern stays put and pulses. And a pattern that oscillated with a period that happened to match my 10,000-step windows would come back to the same frame and count as stopped. I didn't look for that.

The simulator is one small file: plain JavaScript, a 9-point Laplacian, one explicit step at a time, with the diffusion rates (1.0 and 0.5) and step size (1.0) most people use for this. A different Laplacian or a different step would move the borders of the map slightly. I'd expect the moving to survive that, since it survived halving the step.