Self-taught AI masters the Rubik’s cube

Original article was published by Sahil Rikhy on Artificial Intelligence on Medium

Self-taught AI masters the Rubik’s cube

There are 43 quintillion ways to hold a Rubik Cube. With 6 sides representing nine blocks of a single color, a Rubik Cube has 43,000,000,000,000,000,000 ways that it can be shuffled. Yet DeepCubeA, an artificial intelligence (AI) system, learned how to solve each of those 43 quintillion combinations in an average of 1.2 seconds or 20 moves.

Surprisingly no one knows how DeepCubeA figured out that each Rubik cube is to have a single color on each of its six sixes, not even the creators. This artificial intelligence program itself figured out how to get to the end result, and has everyone in shock as to the strategies that it developed to get there in the least amount of moves.

DeepCubeA uses a neural network ( learning tasks by just looking at examples), coupled with machine learning techniques, which required minimum human input. This artificial intelligence system learns by detecting patterns, its basically self-taught

“Artificial Intelligence can defeat the world’s best human chess and Go players, but some of the more difficult puzzles, such as the Rubik’s Cube, had not been solved by computers, so we thought they were open for AI approaches,” said Baldi.

The algorithm was initially designed for researchers to understand why and how the AI made its moves and how long it took to perfect the method. Once the code was made, DeepCubeA trained in isolation for 2 days, solving increasingly difficult combinations, and in time it began to learn and self adapt.

This AI algorithm solved 100% of its 1000 test trials, using the minimum moves nearly 60% of the time. 36% of the time, this artificial intelligence solved the Rubik Code using just 3 more moves than the required minimum. Considering the average human takes 50 moves to solve the cube, DeepCubeA is far ahead and smarter, with a much more logical approach.

Originally published by Sahil Rikhy at