ceg.me

Rubik's Cube Solver

Paint the colors of your cube onto the diagram. The solver finds a short sequence of turns, usually 19 to 22, and plays it back on a 3D cube.

1. Enter your cube

Hold the cube with white on top and green facing you. The diagram unfolds it as shown. The center stickers are fixed. Click a sticker, or drag across several, to paint it. Undo steps back one change.

How it works

The solver is Kociemba's two-phase algorithm. Phase 1 turns the cube into a position that can be finished using only U, D, R2, L2, F2 and B2. Phase 2 solves it from there. Pruning tables, built in your browser in about half a second, keep both searches small.

The first solution is usually 22 to 25 moves. The search then keeps going with a shorter length limit until the search time runs out, which is why a longer budget can find a shorter solution. The shortest possible solution is never longer than 20 moves, and this solver does not prove that its answer is the shortest.

The search runs in a Web Worker on your device and nothing is uploaded. Source code: github.com/cegme/rubiks.