Wave Function Collapse
A from-scratch implementation of the Wave Function Collapse procedural generation algorithm.
PythonProcedural Generation
Found a demo of Wave Function Collapse online and wanted to understand it well enough to reproduce it — the algorithm generates locally-coherent output (textures, tilemaps, …) by treating generation as a constraint-propagation problem, collapsing one cell’s possibilities at a time based on its neighbors.
Finished as a self-contained implementation.
