AI solves Rubik's Cube in one second Published duration 16 July 2019

image copyright Getty Images image caption The Rubik's Cube is a puzzle challenging people to create six sides of a single colour

An artificial intelligence system created by researchers at the University of California has solved the Rubik's Cube in just over a second.

DeepCubeA, as the algorithm was called, completed the 3D logic puzzle which has been taxing humans since it was invented in 1974.

"It learned on its own," said report author Prof Pierre Baldi.

The researchers noted that its strategy was very different from the way humans tackle the puzzle.

"My best guess is that the AI's form of reasoning is completely different from a human's," said Prof Baldi, who is professor of computer science at University of California, Irvine.

The study, published in Nature Machine Intelligence , saw the algorithm given 10 billion different combinations of the puzzle, with the target to decode all of them within 30 moves.

It was then tested on 1,000 of these and managed to solve all of them, finding the shortest path to the solution about 60% of the time.

'Hefty goal'

Humans able to solve the puzzle quickly generally take about 50 moves. The AI system solved it in an average of 28 moves.

The computer algorithm is not the first or the fastest non-human to solve the puzzle. That honour goes to a system devised at the Massachusetts Institute of Technology, dubbed the min2phase algorithm, which solved the puzzle three times faster.

But crucially that system did not use a neural network - which mimics how the human brain works - or machine learning techniques and was programmed just to solve the puzzle.

Creating a system that teaches itself to complete the challenge is seen as the first step towards creating an AI that can move beyond games to solve real-world problems.

"The solution to the Rubik's Cube involves symbolic, mathematical and abstract thinking, so a deep learning machine that can crack such a puzzle is getting closer to becoming a system that can think, reason, plan and make decisions," said Prof Baldi.

"How do we create advanced AI that is smarter, more robust and capable of reasoning, understanding and planning? This work is a step toward this hefty goal."