🗺️ Wave Function Collapse

Procedural level generation · Constraint propagation · Entropy-guided collapse

Controls

Speed

Tile Set

Stats

Collapsed cells0
Remaining
Contradictions0
StatusReady

🧩 Wave Function Collapse — Procedural Generation

Watch the Wave Function Collapse (WFC) algorithm generate coherent tile maps in real time. Tiles propagate adjacency constraints across the grid, with entropy guiding the collapse order.

🔬 What It Demonstrates

WFC maintains a superposition of possible tiles at each cell. The cell with lowest Shannon entropy collapses first (is assigned a definite tile). Constraint propagation then eliminates incompatible neighbours, reducing entropy across the grid until all cells are resolved.

🎮 How to Use

Select a tile set and grid size. Click Start to watch entropy-guided collapse. Cells collapse one at a time, with constraint propagation rippling outward. The colour indicates remaining entropy.

💡 Did You Know?

WFC was created by Maxim Gumin in 2016, inspired by quantum mechanics notation. It's now used in commercial games (Townscaper, Bad North) and architectural design for procedural environment generation.