Tile Collapse
A wave function collapse you play by hand, one square at a time.
Wave function collapse is usually run as a solver: it picks the most constrained cell, collapses it, propagates, and repeats until the grid is full. You watch the output. Here the observation order is handed to you instead. Click a square to seed it, then hover the squares around it and each one lifts, turns over, and settles as whichever tile is still legal in that position.
How it works
Every tile carries four edge sockets, one per side. Two tiles may sit next to each other only where the shared edge matches, which is what keeps the lines running continuously from one square into the next.
Collapsing a square narrows what its neighbours can be, and that narrowing spreads outward until nothing changes. Where more than one tile still fits, one is chosen at random, weighted so the quieter tiles appear more often than the busy ones. It never lays out the same way twice.
The tiles are inspired by Esther’s tiles, redrawn as black and white marks.
The tileset
Twenty tiles, all drawn in the same square: straights, corners, tees and a cross for the connective work, then terminals that resolve a line into a dot, a ring, a square or a triangle, and a few marks that sit inside a run so a straight line can still carry a symbol.
The artwork and the solver are deliberately kept apart. The tiles are plain data, a path and four socket values each, so the icon set can be swapped without touching the algorithm.
Playing it
- Click any square to place the first tile
- Hover the squares touching it to collapse them one at a time
- Arrow keys move a cursor and Enter collapses, so it works without a mouse
- Fill the rest finishes the grid the way the algorithm normally would, lowest entropy first
Occasionally a square ends up with nothing legal left in it. That is a genuine contradiction rather than a bug, and it is marked with a hatch rather than hidden.
Wave function collapse, playable
Each tile only fits where its open edges meet another tile's open edges, so the pattern has to stay continuous. Where more than one tile fits, one is picked at random, which is why it never lays out the same way twice.