How to add a Rubik's cube to a novice by the algorithm of god? Augmented reality comes to the rescue
Despite the fact that the Rubik's cube has been around for many decades, this puzzle continues to be popular. Records are set - both by humans and robots, the puzzle solution algorithm is being improved. And now computers can already teach how to assemble a Cube of a person with any level of experience (we are talking here about training applications, of which there are many). Correctly collect all the faces after a couple of days of training with the help of a computer can even those who took the toy in their hands for the first time.
By the way, the world champion in assembling the Rubik's cube (yes, there are such champions) solves the puzzle in just 4.9 seconds. The champion's name is Lucas Etter, a teenager from the USA. A similar record for the robotic system is already 0.887 seconds (although this result has not yet been confirmed). But how to learn to quickly assemble a Rubik's cube by yourself? You can train (this can take many years). And you can use a special program that will help collect the cube in the minimum number of moves (the so-called algorithm of God ). Here, no training is needed, the application does everything by itself. This is how a human champion collects a cube:
')
And so - the champion computer:
Generally speaking, there are many algorithms for assembling a puzzle. For the average person, the average number of moves is about 40 . Few champions are able to collect a cube according to the algorithm of God. In short, this is the name of the algorithm that requires the minimum number of moves to build any initial configuration. For the Rubik's Cube, this number is 20.
Now back to augmented reality. A developer named Martin Španěl created the application Mistr Kostky , which helps to build a Rubik's cube to a person. Moreover, the number of moves is exactly the same - exactly 20. An application can determine the state of 2-3 faces of a cube at a time, and the OpenCV library is used to recognize the received images.
Augmented reality shows how to rotate the edges of the puzzle in order to achieve the optimal number of moves. The developer has created his program in the framework of scientific work - he is a student at Charles University (Prague).
The program works in two stages. At the first, the state of each face is recognized. After the system completes the first stage, the second begins - the application shows the user where and how to rotate the faces of the cube to solve the puzzle (sometimes it turns out to be done in less than 20 moves).
Interestingly, if the owner of the puzzle is mistaken, the application has to be restarted - it is not able to reorganize on the fly. I note that applications for solving the Rubik's cube did not appear now. This is one of the best, yes, but back in 2009, the Cube Cheater program was added to the Apple application directory. She helped the user to find a solution to the photo faces.
Initially, the author created his application for Android, but promised to release a version for other platforms. Here is the Mistr Kostky discussion thread on Reddit .