I have never managed to solve a Rubik's cube in my life. I admire those who have developed extraordinary skill with this puzzle, but all I can do is steal a chapter from Captain Kirk's "manual of unsolvable problems"... and cheat. How? Using Cubr, an online application that lets us take photos of the Rubik's cube with a webcam, analyze its position, and finally execute the correct moves to solve it.
From 23 Moves to 20
Eight years ago we learned that the God's algorithm for solving the Rubik's cube required only 23 moves, regardless of its initial state. In July 2010, a Google-sponsored analysis managed to lower that number to just 20 moves. Then robots appeared that focused on optimizing the speed of the solution, taking less than a second and a half. Now it's time for the rest of us mortals to impress our friends (?) with a solved Rubik's cube on the table. What do we need besides the damned cube? A computer with a webcam, and internet access to enter the Cubr portal.
https://www.youtube.com/embed/QrLaajSDnTwHow Cubr Works
Cubr is a project by Chris Baker, a student at Carnegie Mellon University. Using the software is very simple: Cubr asks permission to start the webcam and take a photo of each side of the cube. Once all sides have been registered, we place the two cubes (the virtual and the real one) in the same perspective, and let the software do the hard work. Cubr allows us to speed up the solution or slow it down, and also has a "tutorial mode" that helps us improve our skills. One of the great challenges Baker faced was color recognition through the webcam. Differences in lighting and overall hardware quality can cause Cubr to make mistakes, but in the vast majority of cases, the software correctly interprets the small panels.
The Three-Layer Solution
Cubr's algorithm is based on the so-called "three-layer solution" published by David Singmaster in 1980, which of course remains perfectly valid to defeat the famous puzzle once and for all. In fact, Cubr has been on the web for three years, and originally only a local copy could be downloaded, but now there are two options: access its page, or get the source code from GitHub.