Site areas:
ProgrammU19 CREATE YOUR WORLD

Rubik’s Cube Solver

Thomas Schaschinger (AT)

Through the use of a smartphone camera’s object & color recognition capabilities, this app can automatically register the composition of a Rubik’s Cube.

Then, a so-called Singmaster String is sent to a C / C++ program running on a high-performance computer, which is then able to optimally solve the cube—i.e. in 21 or fewer 90° rotations. The first time the program starts up, approximately 1.5 gigabytes of solutions are generated; they’re arrayed in a tree (brachiating) structure with, of course, the completed cube at the end. These are, needless to say, nowhere near all possible combinations. If none of these combinations matches the cube’s current combination, then it must at least include symmetries since all “non-symmetries” are depicted in the solutions tree. In this case, the cube is rotated until its composition corresponds to one of the anti-symmetrical groups in the solutions tree. Thereafter, it’s simply a matter of following the path to the solved cube. Solution duration: approximately 1 second to 5 minutes.

The result of the program—or, to put it more precisely, the rotation commands—are sent via a Python Script to the robot’s three Arduino Unos, which interpret these in the form of commands for the stepper motors and finally carry them out.