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.
The page did not finish loading, so the solver is not running. Reload with Ctrl+Shift+R, or Cmd+Shift+R on a Mac, to get the latest files.
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.
2. Solution
Trigger rules
Moves that make up a trigger are joined into a colored chunk with its name under it. A trigger also counts with the cube turned, so F R F' R' is Rightie. Hedgeslammer starts with a wide turn, so the solver never produces it. Most solutions contain no trigger.
The two cubes show the same cube from opposite sides. The face that turns next is marked with an arrow, and the cube with that face is outlined. A turn is clockwise when you look straight at that face, which is the direction a clock hand moves. A prime (') means counterclockwise and a 2 means a half turn. The left and right arrow keys also step through the moves.
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.