What this is
A hand-built laboratory for twisty puzzles: a 2×2, 3×3, 4×4 and 5×5 Rubik's cube, a megaminx — the twelve-sided one — a pyraminx and a skewb. Press scramble and any of them ties itself in a knot; press solve and it finds its way home, with real showmanship. But the point isn't the trick. Every instrument in the room exists to let you see the mathematics happen: a map where every dot is a genuine position, a statistics panel that computes its numbers live from the solver's own tables, a camera scanner that reads your physical cube, a teacher that walks you through its solution one glowing arrow at a time, and a door that puts the whole thing on your table in augmented reality.
If you left it alone just now, the room already showed you: it opens with an overture — a scramble and an untying, performed slowly, then fast, then slowly again, the way a magician paces a reveal.
What group theory is, in plain words
Take any object and list all the ways you can change it and still be able to change it back — rotations, reflections, twists. Now notice three things about that list: doing one change after another gives you something still on the list; there's a "do nothing" change; and every change has an undo. A collection with those three properties is called a group, and group theory is the study of what such collections can and cannot do. It sounds austere. It is actually the mathematics of symmetry, and it runs through crystals, particle physics, cryptography, and the wallpaper in your hallway.
A Rubik's cube is a group you can hold. Its elements are the 43,252,003,274,489,856,000 positions; its generators are the six face turns; composing moves is the group operation; the solved cube is the identity; and solving is nothing more or less than finding the inverse of whatever was done to it. Scrambling and solving are the same walk, taken in opposite directions.
The map in the room draws this literally. Lay out every position as a dot, join positions that differ by one turn, and you get the cube's Cayley graph — a universe where "distance from home" means "minimum turns to solve". For the pocket cube the room charts all 3,674,160 positions exactly; watch a solve and you'll see the comet fall inward one shell per turn, never a wasted move, because on that puzzle the room solves optimally and optimality is visible.
How it solves — honestly
Different sizes call for different honesty:
- 2×2 — God's algorithm. The space is small enough to visit every single position with a breadth-first search and write down its exact distance from home. Every solution shown is provably the shortest possible; none needs more than 11 turns, the pocket cube's God's number.
- 3×3 — Kociemba's two-phase algorithm, the mathematics real solving machines use. Phase one steers orientation and slice coordinates into a subgroup called G1 = ⟨U, D, R², L², F², B²⟩ — a sub-universe about two billion times smaller — and phase two finishes inside it without ever breaking what phase one fixed. Pruning tables built in a background worker give the search a proven "at least this far" compass. Solutions land around twenty turns; the ticker even underlines the moment the algebra changes gears.
- 4×4, 5×5 and the megaminx — Ariadne's thread. At 10⁴⁵–10⁷⁴ positions, no optimal solver fits in a browser tab and even the God's numbers are unknown. So these puzzles remember every turn of their scramble and solve by playing the group inverse of that word, simplified where turns cancel. The room says so on the label — no trick is ever passed off as more than it is.
One engine underneath makes this trustworthy: the program never hard-codes what a twist does. It rotates a slab of sticker polygons in space and asks who landed where — the permutation is discovered from geometry, and the solvers derive their move tables through the same discovery, so the picture and the mathematics cannot disagree.
What you get out of it
An hour of "wait, show me that again". Fling the puzzle, open the map beside it, watch a 20-turn solve dive through a subgroup. The mathematics essay inside explains every instrument in plain language.
Scan it with your camera (or paint the colours in), and the room solves your cube — then teaches it back one turn at a time, with a glowing arrow on the face to turn and a camera that aims itself. A "back" button forgives everything.
Exact censuses computed live from the God table, proven-distance readouts, a walkable Cayley graph, an antipode button, the superflip, and a sequence lab where any word in the group becomes a performance you can step through forwards and backwards.
View source — it's meant to be read. Six colour tokens, two system typefaces, three rules of motion, raw WebGL, and a worker doing the heavy math. Architecture notes in room/README.md. MIT licensed: take it, retune the six colours, make it yours.
The instruments, briefly
- the map ✦ — the state space as a galaxy; every dot a real position or solver coordinate, the walk synced turn-for-turn.
- the numbers ✦ — live statistics: exact distributions, exact means, and provable sentences like "deeper than 97% of all positions".
- scan your cube ✦ — six camera poses; frames never leave your device; impossible scans are caught by the laws of the cube.
- the score ✦ — write any sequence in notation (patterns included) and have it performed or taught, forwards and back.
- put it in your room ✦ — WebXR on Android; a gyroscope window on iPhone, labelled honestly; either way it sits there quietly scrambling and solving itself like an ornament that thinks.