Wave Function Collapse
Wave Function Collapse is a procedural-generation algorithm that assembles a tile pattern obeying local matching rules, borrowing its name from the quantum image of a superposition collapsing to one state. Every grid cell starts as a superposition of all possible tiles. The solver repeatedly finds the least certain cell (the one with the fewest options left), "collapses" it to a single tile at random, then propagates the consequences: neighbours that can no longer connect drop those options, which constrains their neighbours in turn, a ripple of shrinking possibilities. Watch the wave of decisions sweep across the grid until every cell is settled into one seamless design. Pick a tile set (circuit, knots, terrain), set the grid size and watch it solve, occasionally hitting a contradiction and restarting.
Runs 100% in your browser — simulations are computed locally on your device.
Read the full guide to this tool
Notes
- The rule is minimum-entropy first: always collapse the most-constrained cell next, because guessing where you have the fewest choices is least likely to paint you into a corner.
- Propagation is arc-consistency, the same constraint-satisfaction step used by Sudoku solvers: removing a tile option from one cell can cascade through the whole grid before the next guess.
- A guess can still lead to a dead end where some cell has no legal tile left; the solver detects the contradiction and backtracks or restarts, which is why generation sometimes visibly starts over.
- Runs 100% in your browser — simulations are computed locally on your device.