OpenAI's Robot Hand Taught Itself How to Solve a Rubik's Cube

Using novel neural networks developed by OpenAI, this robotic hand is able to learn how to solve a Rubik's Cube on its own.

Chris Wiltz

October 22, 2019

5 Min Read
OpenAI's Robot Hand Taught Itself How to Solve a Rubik's Cube

(Image source: OpenAI)

Can you solve a Rubik's Cube one-handed? This robotic hand can thanks to work done by artificial intelligence research company OpenAI. Using a combination of neural networks, OpenAI has developed a system whereby a robotic hand teaches itself the principles of solving the cube, then does so. The results of the research are published in a paper released by OpenAI.

At first glance it's tempting to assume OpenAI achieved this by using sophisticated hardware and some readily-available software for solving a Rubik's Cube. In actuality this was achieved using older hardware (the robot hand used has been around about 15 years) and an innovative software approach. Rather than simply programming the robotic hand to solve the Rubik's Cube, OpenAI used neural networks to train the robot via simulation then ported that into the physical robotic hand. Over the course of running numerous simulations, which OpenAI says accounts for about a thousand years of working with a Rubik's Cube, the AI is able to learn the rules of solving a cube and develop strategies for doing so.

Watch OpenAI's robotic hand solve a Rubik's Cube in real time. (Source: OpenAI)

OpenAI first accomplished having AI solve a Rubik's Cube back in 2017, but that was done entirely in simulation. To transfer that same skill over into the real world the AI needed to take real-world factors into consideration – things like weight, friction, and elasticity – all of which do not really exist in a virtual environment.

The actual solving of the cube was handled using a combination of reinforcement learning and by training an AI on using Kociemba's algorithm, an algorithm used by humans to solve Rubik's Cubes as quickly as possible. Essentially, the AI tried to solve a cube over and over again, and was rewarded every time it made a correct move or came up with a solution.

To take things further, and to create more parity with the real world, the researchers created a new algorithm called automatic domain randomization (ADR) that automatically adjusts random variables in an virtual environment. Each time the AI solved the puzzle, ADR would make the next puzzle more difficult by changing the environment. Parameters, such as the mass of the cube, friction, and surface materials were all progressively randomized to make the task harder. Doing this forced the AI to learn in a way that allows it to continuously adapt as required in the real-worldv – where any number of variables could make the task harder –  in order to meet performance thresholds.

RELATED ARTICLES:

The robotic hand used was the Shadow Dexterous Hand, manufacturing by UK-based Shadow Robot Company. The human-sized hands features 20 actuated degrees of freedom and a total of 24 joints. According to Shadow Robot company each joint of the Shadow Hand has a movement range that is equal or very close to that of an actual human hand. The Shadow Hand also features a total of 129 sensors and can sense things such as the position, texture, and temperature of what it is holding.

According to their paper the OpenAI team made several modifications to the Shadow Hand for their purposes, including increasing the grip area and various upgrades to improve the overall durability and robustness of the hand. The dexterity of the Shadow Hand, combined with OpenAI's neural network approach means the hand can solve a cube even if being interrupted by being poked or prodded or even if the hand is wearing a glove. If the hand happens to drop the cube it could also pick right up where it left off. It handles all of these disturbances and interruptions without having to be priorly trained to do so.

OpenAI's system can still solve a Rubik's Cube while being interrupted. (Source: OpenAI)

Anyone who has tried to solve a Rubik's Cube with two hands, let alone one, can understand how time-consuming and mentally exhausting it can be. There are global competitions where humans of all ages compete to see who can solve a Rubik's Cube the fastest. The current world record, according to the World Cube Organization – the governing body of Rubik's Cube competitions – is 3.47 seconds.

Aside from their high level of dexterity, elite competitors memorize thousands of algorithms (including the Kociemba's algorithm employed by OpenAI) and apply them on the fly to solve the cubes in blindingly fast times. Luck still plays some factor, but to solve a cube in record time based entirely on luck would be pretty much impossible.

OpenAI's system won't be winning any world records any time soon however. While it can solve a cube in a few minutes (which is still better than a lot of humans) OpenAI said it only solves the Rubik's Cube 20 percent of the time when it's given a “maximally difficult scramble.” Mathematicians have worked out that any Rubik's Cube can be solved in 26 face rotations or less. The maximum difficulty requires a full 26 moves to solve the “scramble,” or random configuration of the cube. For simpler scrambles that only require about 15 rotations to solve, OpenAI's method is able to solve the cube 60 percent of the time.

But OpenAI's goal isn't to build the best Rubik's Cube-solving robot. The company is aiming to use this methodology to establish a framework for “meta learning” (learning how to learn) that will allow for more generalized AI to be developed. The same AI that trained a robot to solve a Rubik's Cube could teach it to handle other tasks as well.

In the much longer term this could be a step toward general AI. But in the near term it can lead to robots and systems that are highly adaptable and do not need to be trained to operate within a given environment or purpose-built for specific tasks.

Chris Wiltz is a Senior Editor at  Design News covering emerging technologies including AI, VR/AR, blockchain, and robotics.

Sign up for the Design News Daily newsletter.

You May Also Like