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.
2. Solution
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.
Trigger names
A trigger is a short sequence of turns that cubers practice until they can do it without thinking. When one appears in the solution, its chips are boxed together and labeled with its name. A trigger also counts when it uses other faces, so F R F' R' is labeled as Rightie with the cube turned. The solver picks solutions for their length, not for their structure, so most solutions contain no trigger at all.
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.