Skip to main content
QUICK REVIEW

[Paper Review] Solving the Rubik's Cube Without Human Knowledge

Stephen McAleer, Forest Agostinelli|arXiv (Cornell University)|May 18, 2018
Artificial Intelligence in GamesComputer Science19 references18 citations
TL;DR

This paper introduces Autodidactic Iteration (ADI), a reinforcement learning algorithm that teaches an agent to solve the 3x3x3 Rubik’s Cube from scratch using only self-supervised learning and Monte Carlo Tree Search (MCTS), achieving a median solve length of 30 moves—on par with human-designed solvers—without any human-provided domain knowledge or reward shaping.

ABSTRACT

A generally intelligent agent must be able to teach itself how to solve problems in complex domains with minimal human supervision. Recently, deep reinforcement learning algorithms combined with self-play have achieved superhuman proficiency in Go, Chess, and Shogi without human data or domain knowledge. In these environments, a reward is always received at the end of the game, however, for many combinatorial optimization environments, rewards are sparse and episodes are not guaranteed to terminate. We introduce Autodidactic Iteration: a novel reinforcement learning algorithm that is able to teach itself how to solve the Rubik's Cube with no human assistance. Our algorithm is able to solve 100% of randomly scrambled cubes while achieving a median solve length of 30 moves -- less than or equal to solvers that employ human domain knowledge.

Motivation & Objective

  • To develop a reinforcement learning agent capable of solving the Rubik’s Cube with no human supervision or domain-specific knowledge.
  • To address the challenge of sparse rewards in combinatorial optimization environments where only the final goal state provides a reward signal.
  • To train a deep neural network to estimate optimal value functions and policies through self-supervised iterative learning.
  • To demonstrate that an agent can discover complex strategies, such as conjugation patterns, equivalent to advanced human speed-cubing techniques.
  • To extend the method to other combinatorial optimization problems, such as protein folding, via transferable value function learning.

Proposed method

  • Proposes Autodidactic Iteration (ADI), a self-supervised training loop that iteratively improves a deep neural network’s value and policy functions.
  • Uses breadth-first search (BFS) from the goal state to generate synthetic training data, estimating optimal returns for each state via recursive value backup using the max operator.
  • Trains the value network via supervised learning on targets derived from BFS, using the network’s own predictions to bootstrap future value estimates.
  • Constructs policy targets based on the action that maximizes the predicted value, enabling end-to-end policy learning.
  • Combines the trained neural network with Monte Carlo Tree Search (MCTS) to efficiently search for solutions during inference.
  • Employs a sliding window analysis on solution sequences to identify and quantify recurring move patterns, such as the $aba^{-1}$ conjugation.

Experimental results

Research questions

  • RQ1Can a reinforcement learning agent solve the Rubik’s Cube using only self-supervised learning and no human-provided knowledge or reward shaping?
  • RQ2Can the agent discover complex, human-like solving strategies—such as conjugation patterns—through pure self-play and value function learning?
  • RQ3Does the combination of self-supervised value function learning and MCTS enable sample-efficient, high-performance solving in environments with sparse rewards?
  • RQ4Can the learned value function generalize to solve all 4.3×10^19 possible cube states with high success and low move count?
  • RQ5To what extent can this framework be extended to other combinatorial optimization problems with sparse rewards and large state spaces?

Key findings

  • The proposed agent, DeepCube, successfully solves 100% of randomly scrambled 3x3x3 Rubik’s Cube configurations.
  • DeepCube achieves a median solve length of 30 moves in the quarter-turn metric, matching or outperforming solvers that rely on human-designed heuristics.
  • The agent discovers and heavily utilizes the $aba^{-1}$ conjugation pattern, which is a hallmark of advanced human speed-cubing techniques.
  • The 14 most frequently used move triplets in the solution paths correspond exactly to the $aba^{-1}$ conjugation structure, indicating strategic learning.
  • The distribution of conjugation triplets is significantly more frequent than non-conjugation triplets, with a higher mean frequency, suggesting strategic preference.
  • The agent learns to prioritize forming a 2x2x2 corner early in the solving process, followed by pairing and positioning edge and corner pieces—mirroring a known human solving strategy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.