The server scrambles a Rubik's Cube in PHP (or takes your own cube) and solves it with two methods. You can replay the solution step by step on the 3D cube: you see which face turns which way, and which stage of the method is running.
PHP is solving the cube…
The cube is always held the same way: white center on top, green center facing you. The letter names the face that turns.
The layer-by-layer (beginner) method follows human logic: it solves the bottom layer first (cross, then corners), then the middle-layer edges, and finally the top layer in four steps. Here that is typically 120-150 moves, because every stage repeats short algorithms that keep the finished parts intact, but a person can learn the very same routine.
The Kociemba algorithm treats the cube as a mathematical structure and searches in two phases: first it reaches an intermediate state from which a restricted move set is enough, then it finishes with that. Precomputed tables tell the search how many moves are at least still needed, so it typically finds a 20-22 move solution in a few tenths of a second.
In 2010, a computer-assisted proof established that every possible cube state can be solved in at most 20 moves: this is God's Number, and the Kociemba algorithm gets close to this theoretical optimum.
The cube has about 43 quintillion (4.3x10^19) possible states: that is why brute-force guessing cannot solve it, and you need either a human strategy or a clever, group-theory-based search.
This site uses Google Analytics to measure visits. This requires your consent - see the privacy policy for details. Privacy Policy