Solving the Mini-Rubik

Here is a little applet that lets you solve the 2x2x2 Mini-Rubik. This program always finds the shortest solution. This has been proved formally in Coq (see here). To enter a specific configuration, you first need to edit the cube. Editing is performed using the keys "Enter", "Backspace", "→", "←", "↑" and "↓". At any time you can rotate the cube by clicking on it with the left button of the mouse and dragging towards the direction you want to rotate to.

Unvalidating all the small cubes is done by repeatedly pressing the "Backspace" key and leads to:



The small cube that is currently edited is in gray. Selecting which small cube corresponds to this postion is done using the arrows "→" and "←".



Once the appropriate small cube has been chosen, its orientation can be adjusted using the arrows "↑" and "↓".



Once the small cube is correctly orientated, it can be validated using the key "Enter":



This operation of choosing and orientating each single small cube has to be repeated in order to get a complete configuration:



Now, the shortest solution is computed when pressing the key "Enter":



The solution is displayed with the usual notation (r stands for a right clockwise rotation, b for a back clockwise rotation and d for a down clowise rotation, anticlockwise rotations are represented with negative exponent as in r-1, half-turns by a squaring as in r2). The solution can be animated step by step. The current move is highlighted in red. Pressing the key "Enter" performs a step:



This step can be undone pressing the key "Backspace". Validating all the moves leads to the inital cube: