how the guided mode works
This page explains the algorithm behind the playground and the mathematics it leans on. Each claim is labelled: proven published results, confident standard consequences we believe are correct, heuristic engineering choices, and unknown things we could not verify. If you spot an error in the reasoning, we genuinely want to hear about it.
the tile
The Spectre (Smith, Myers, Kaplan & Goodman-Strauss, 2023) is an aperiodic monotile: a single shape whose same-handed copies tile the whole plane, and every such tiling is non-periodic: it never slides onto itself. The playground uses its equilateral form, Tile(1,1), a 14-sided polygon with unit edges. Drawn with curved edges, the matching rule becomes physical: every edge is either a bump or a dent, and a bump only nests into a dent. Combinatorially this is the rule that an odd-numbered edge may only be glued to an even-numbered edge, with rotations only (multiples of 30°), never reflections.
the three modes
free stamps tiles anywhere, no rules. local offers every placement that fits its immediate neighbours: edge-to-edge, bump-into-dent, no overlap. Local validity is not enough. You can follow it faithfully and still build a figure that can never be completed to a full tiling of the plane. guided is the mode this page is about: it only offers placements that provably extend to a perfect, hole-free tiling.
the algorithm: embedding into a master patch
The discovery papers prove aperiodicity through a substitution system: nine cluster types ("metatiles") together with rules for expanding each cluster into a configuration of the others. Iterating the rules from a seed produces arbitrarily large patches of a genuine Spectre tiling. Each substitution level mirrors the configuration, so an even number of iterations yields a patch of same-handed spectres. The playground precomputes one such master patch (level 4: 4,401 tiles; grown on demand from level 6, cropped to the needed radius, up to ~150,000 tiles).
The board is then scored against this patch. An embedding is a rotation plus translation that maps your entire figure onto tiles of the master patch. The app maintains the set of all surviving embeddings, displayed as worlds, and a candidate placement is offered exactly when at least one embedding endorses it (i.e., figure + candidate still maps into the patch). Each tile you place simply filters the surviving set, so the check is incremental and fast.
why this offers only valid placements
proven Anything guided mode offers embeds in the master patch, and the master patch is a piece of a real tiling that extends to the infinite plane (keep substituting). So no offer is ever wrong. Guided mode has no false positives, at any scale.
why this offers every valid placement
The interesting direction is completeness: could a placement be genuinely valid (extendable to an infinite tiling) yet missing from the master patch? The argument that it cannot (while the patch is big enough) has three steps.
- proven Every Spectre tiling is hierarchical. The aperiodicity proof works by showing that any whole-plane tiling by Spectres can be de-substituted, grouped back into metatiles, and those into supertiles, uniquely, level after level. There are no "rogue" tilings outside the substitution hierarchy.
- confident All Spectre tilings look alike locally. Expand any of the nine metatile types a few levels and it contains copies of all nine (the substitution is primitive). Consequently a level-n supertile of any type occurs in every tiling, scattered with positive density, and every copy is internally identical. Now take any valid finite figure F: it lives inside some tiling, hence inside (or across a few) supertiles of a high enough level; those supertiles recur in every tiling; therefore F occurs in every Spectre tiling, repeatedly, with a recurrence distance R that grows only linearly with F's size. This "local indistinguishability / repetitivity" is the standard structure theory of primitive substitution tilings applied to the Spectre; the long-range-order literature on the Spectre supports it.
- confident One big-enough window therefore contains everything. The master patch is a window cut from a real tiling. If its radius comfortably exceeds the recurrence distance R for figures of the current size, then at least one copy of every valid figure of that size lies wholly inside the window, and the embedding search finds it. The patch is not an enumeration of tilings; it is a sample large enough that every small legal configuration appears in it somewhere.
heuristic The playground enforces patch radius ≥ 3 × figure diameter, expanding the patch automatically when a figure approaches the margin. unknown The published quantitative repetitivity constant for Spectre tilings (the exact factor that would make the margin a proven bound rather than a safe engineering choice) is not something we have verified. If the hard cap on patch size is ever reached (figures thousands of tiles across), the app says so on screen instead of silently degrading.
An alternative exact method exists that needs no master patch at all: run the de-substitution on the player's figure itself, tracking the finitely many consistent groupings at the figure's boundary. It would remove the margin constant entirely, at the cost of much trickier boundary bookkeeping. The patch method was chosen for simplicity and testability.
what "worlds" means, and does not mean
worlds counts the surviving embeddings of your figure into the current master patch. Its early collapse is meaningful: each genuinely free choice you make destroys embeddings, and that destruction is the information your figure encodes: a growing prefix of the tile's hierarchical "address" (which child of which supertile of which super-supertile…). A photograph of a figure determines such an address prefix; a bigger photograph determines more digits.
What worlds does not measure: the number of ways your figure can be continued. proven Every valid finite figure extends to uncountably many distinct infinite tilings. The choice never runs out, no matter how much you tile. And because all tilings contain identical copies of every small figure, no finite figure ever determines "which" infinite tiling you are in. So "worlds = 1" late in a long game means your figure's position within the finite patch is pinned, an artifact of the window's size, not a statement that the tiling's future has become forced.
claims at a glance
proven the Spectre is a chiral aperiodic monotile; every tiling de-substitutes uniquely into supertiles.
proven guided offers are always valid (they embed in a real patch that extends to the plane).
confident the substitution is primitive; hence all tilings are locally indistinguishable and repetitive, and a large-enough window contains every small legal figure.
confident therefore guided mode misses nothing while the patch margin holds.
heuristic the specific margin (patch radius ≥ 3× figure diameter) and the on-demand growth schedule.
unknown the explicit repetitivity constant for Spectre tilings; whether a simple no-lookahead local growth rule exists for the Spectre (for Penrose tilings, naive local growth famously dead-ends).
implementation notes
- Everything runs client-side in vanilla JS on one canvas; the geometry and substitution engine is spectre.js, with node test suites (test.cjs, test-patch.cjs) covering the polygon, the matching rule, the patch (parity of all ~29,000 glued edges, no overlaps), and guided growth (hundreds of random guided placements never dead-end; random local placements provably do).
- The local matching rule (odd edge to even edge) is implemented independently of the patch, and a test asserts guided candidates are always a subset of local ones.
- The share panel serializes the exact board (tile order and colors) into the URL fragment (deflate + base64url), so a figure is a shareable, replayable code; the replay player reads that same order back like sheet music.
- Publishing sends the board to a small companion Space (spectre-ingest) that validates it and commits it under its chosen name to the public dataset spectre-shapes; browsing and loading go straight to the dataset. The same companion tallies anonymous visit beacons per day. No IP addresses or user agents are logged or stored, ever.
- The auto button picks one surviving embedding at random and fills a disc from its outer ring inward, a deliberate cheat that only the hierarchy makes safe.
references
- D. Smith, J. S. Myers, C. S. Kaplan, C. Goodman-Strauss, An aperiodic monotile (2023). The Hat.
- D. Smith, J. S. Myers, C. S. Kaplan, C. Goodman-Strauss, A chiral aperiodic monotile (2023). The Spectre and its substitution system.
- C. S. Kaplan, the Spectre page.
- S. Tatham, Combinatorial coordinates for the aperiodic Spectre tiling. The hierarchical addressing scheme.
- On long-range order and quasicrystalline structure of Spectre tilings: arXiv:2411.15503.
- Substitution rules ported from reversi-fun/symbolic-spectre-tiles, itself a port of the reference implementation.