WaveFunctionCollapse generates bitmaps and tilemaps by enforcing local NxN pattern similarity to a single input example using entropy-guided constraint propagation.
Key Takeaways
The algorithm alternates observation (collapse lowest-entropy region) and propagation (spread constraints) until the full output is resolved or a contradiction is hit.
Contradictions are NP-hard to prevent in general, but rare in practice; the algorithm restarts when they occur.
A symmetry system for tiles reduces adjacency enumeration size significantly, making tileset configuration practical.
WFC has been ported to C++, Python, Rust, Go, Julia, Kotlin, and integrated into Unity, Unreal Engine 5, Godot 4, and Houdini.
Used in production games including Bad North, Caves of Qud, and Townscaper; also supports constrained synthesis combining human-authored seeds with algorithmic completion.