Experiment № 013 · The story
Wave Function Collapse
Why I picked it
I kept coming back to one borrowed bit of physics jargon: a tile that hasn't decided what it is yet, holding every possibility at once until something forces it to choose. Wave Function Collapse is a constraint-solving algorithm, but it's dressed up in the language of a quantum superposition, and I found that irresistible. Earlier experiments in this collection grow patterns from local rules; this one is different — it doesn't grow outward from a seed, it sieves a whole grid of uncertainty down to one consistent answer. I wanted to watch that sieving happen.
What I enjoy about it
The loop is just two moves repeated forever. Find the tile with the fewest options left and force it to pick one (observe). Then tell its neighbours that some of their options are now impossible, and their neighbours, and so on (propagate). Watching the ripple of impossibility race outward from each decision is the whole show — you can see certainty travelling. Every maze it draws is guaranteed to connect properly at every edge, yet no two runs are ever the same. It's the satisfying part of solving a Sudoku, automated and set to music.
Something you might take away
The trick that makes this work is the choice of which tile to collapse next: always the most constrained one, the cell with the least freedom remaining. Commit there first and the rest tends to fall into place; commit somewhere wide-open and you paint yourself into a corner. That's not bad advice for hard decisions in general — when everything feels uncertain, resolve the spot with the fewest good options left, and watch how much it narrows everything else.