Rubik's Cube Auto-Solver

A 3×3×3 cube endlessly scrambles itself and solves back to a clean state, one quarter-turn at a time, forever. Each cubie tracks its own integer grid position and orientation quaternion, snapped every move to eliminate floating-point drift. The "solve" sequence is simply the recorded scramble moves replayed in reverse with inverted directions — no real search algorithm is needed since the scramble is already known.

Controls

Verification

Cube state is legal-
Face colours 9 each-
Corner twist sum mod 3-
Edge flip sum mod 2-
Corner / edge parity-
Solved (6 uniform faces)-
Cycles solved / failed0 / 0
The science

The state is read back from the 27 cubies (position + orientation of each sticker), not from the animation. A cube reached by legal turns always satisfies: each of the 6 colours appears 9 times, the 8 corners and 12 edges are all distinct pieces, corner twists sum to 0 mod 3, edge flips sum to 0 mod 2, and corner and edge permutation parities are equal.

Reachable states: 8! · 37 · 12! · 211 / 2 = . Only 1 in 12 of the states you could get by taking a cube apart is reachable.

Independent check: the sequence R U has order 105 (repeating it 105 times restores the cube, fewer times does not) and any quarter-turn has order 4.

Honest simplification: this is not a solving algorithm. The scramble is recorded and the solution is that list reversed with each turn inverted.

Made with 🟠 Blender · Three.js