How It Works
Wave Function Collapse (WFC) is an algorithm inspired by quantum mechanics that generates patterns from local constraints.
The Process:
- Superposition: Each cell starts in a superposition of all possible states (tiles)
- Observation: The algorithm picks the cell with lowest entropy (uncertainty)
- Collapse: That cell collapses to a single state
- Propagation: Neighboring cells update their possibilities based on constraints
Tile Types:
Empty Space
Wall
Corner
Junction
Click on cells to manually collapse them and watch the pattern propagate!