Wang Tile Self-Assembly Screensaver
Wang tiles are squares with a real color assigned to each of their four edges. This screensaver places them one at a time onto a grid, always picking a tile whose edge colors genuinely match its already-placed neighbors — building a real constrained mosaic purely through local edge-matching, with no global picture in mind.
How the Wang Tile Self-Assembly screensaver works
Each tile in the real tile set has four independently colored edges: north, east, south and west.
Placement proceeds one cell at a time; a candidate tile is only accepted if its north/west/etc. edge colors genuinely match the already-placed neighboring tiles it touches.
Because only local edge constraints are checked — never a global plan — the final assembled mosaic is a real emergent structure rather than a pre-drawn image.
When no tile in the set can satisfy a cell's constraints, that region resets and retries with a new random tile choice, exactly like a real constraint-satisfaction backtrack.
A worked example
Watch a colored edge on a freshly placed tile force its neighbor's choice — only tiles whose matching edge shares that exact color are eligible, so the pattern visibly builds outward from purely local, tile-to-tile agreements.
Settings & tips
- Tile size trades a bigger board for chunkier individual tiles.
- The board reshuffles with a fresh random tile set once it fills up.
- Watch for repeating tile clusters — the edge-matching constraint alone drives most of the visible order.
Frequently asked questions
- Are Wang tiles a real mathematical concept?
- Yes — introduced by mathematician Hao Wang in 1961 to study whether a set of tiles can tile the plane, a problem later shown to be undecidable in general.
- Does the placement ever fail?
- If no tile fits a cell's constraints, that spot resets and tries again — a real, simple backtracking approach.
- Is a key needed?
- No — it's a pure local computation.
- Is it free?
- Yes — free, no download, in your browser.