An Overview Of The Rubik's Cube Software Used By This Site

The software that supports this web sites is written in C, and ports to DOS, WIN32, or Unix. Although they look similar from the outside, the programs that solve the pocket cube and the standard cube are fundamentally different at the highest level. The pocket cube solver draws upon a precompiled database of accessible configurations and charts an optimal path back to start. In other words, the pocket cube has been completely analyzed. In contrast, the standard cube has too many configurations for this approach, although a team of researchers is almost there! Instead, the standard cube solver applies a Schreier rewriting algorithm that generalizes to any permutation puzzle, including a variety of commercial puzzles. Although it is not obvious from this web site, one can invoke the cube-solver with a different init file, and solve a completely different puzzle. Of course, writing this initialization file is not trivial: half science and half art.

The weakest aspect of this software is its I/O. As colors are entered, one must constantly maintain a frame of reference, as determined by the immovable center squares. When the computer asks: "Enter back face, top row first," one can easily get lost. "Now which was the back face again, and where was the top row?" This problem is compounded when you try to apply the computer's solution. A stream of 60 letters fills the screen, each indicating a 90 degree twist. If you lose your place, or turn a face the wrong way, or apply a move twice, or lose your frame of reference, you find a scrambled cube at the end, whence you must start all over again.

There is a better way, thanks to Java, but I don't have time to implement it. Suppose a Java applet presents a completely white cube. Using your mouse and a 6-color pallet, spin the cube and color each square appropriately, until it looks just like the one in your hand. Then the software solves the cube, and slowly twists each face, one at a time, as you do the same to the cube in your hand. This graphical interface is somewhat slower, but much less susceptible to errors.

Click here if you are interested in the software, or if you'd like to merge it with a Java front end, as described above.

Back to the Rubik home page.