Kociemba two-phase algorithm

Any scramble, solved in about twenty moves.

A 3D Rubik's Cube solver that runs entirely in your browser and animates every move of the solution.

Two phases, one short path

  1. 1

    Reduce the cube. Phase one searches for a short sequence that brings every edge and corner orientation into a restricted subgroup.

  2. 2

    Finish inside it. Phase two solves the rest using only half turns and U or D quarter turns, where the remaining search space is tiny.

  3. 3

    Stay near optimal. Chained together, both phases land around twenty moves, close to God's number, without exhaustive search.

A real solve from this app
scramble
R D L2 D2 B2 D2 B F R2 L' B F2 D' L R U2 D' B2 F2 U F' D F2 B' U2
solution
F' U' R L' D' B' R2 F' R' B U' R2 B2 L2 U L2 U2 R2 B2 D L2 B2
length
22 moves

Watch the solution, or take the wheel

Move-by-move playback

Play, pause, step forward or back, and set the speed. The current move stays highlighted as the cube turns.

Manual mode

Turn any face clockwise or counterclockwise, then solve from the new state.

Nothing leaves your machine

The solver runs in a Web Worker. Pruning tables build once, locally, with no server round-trips.

True 3D, never out of sync

Drag to orbit, scroll to zoom. Every turn animates on the real cube state, so the picture can never drift from the math.

43,252,003,274,489,856,000

reachable positions of a 3×3×3 cube

20

God's number: the most moves any position ever needs

2

search phases in Kociemba's algorithm

Your scramble is waiting.

Solve a cube