A Novel Automated Curriculum Strategy to Solve Hard Sokoban Planning Instances

Dieqiao Feng, Carla P. Gomes, Bart Selman

TL;DR

Deep Reinforcement Learning (RL) struggles with long-horizon AI planning tasks due to extremely sparse rewards. This paper introduces an automated curriculum learning strategy driven by a novel multi-armed bandit algorithm to dynamically select training sub-tasks that sit right on the edge of an agent's capabilities. Applied to the notoriously hard game of Sokoban, this approach solves 80% of previously unsolved instances, vastly outperforming specialized state-of-the-art search solvers that would theoretically take years to find these solutions.

What Problem Does This Paper Address?

AI planning involves finding a sequence of actions to transition from an initial state to a goal state. While deep RL has conquered games like Go and Chess via self-play, it struggles with single-player combinatorial planning tasks like Sokoban (a puzzle game where a player pushes boxes to target locations).

The core issue is extreme reward sparsity. In a hard Sokoban level requiring 200+ precise steps, a randomly exploring RL agent will never accidentally stumble upon the solution. Without a positive reward signal, the agent learns nothing. Furthermore, Sokoban is full of irreversible dead-ends (e.g., pushing a box into a corner). Previous work tried to solve this by manually handcrafting a curriculum of increasingly difficult tasks, but this requires heavy domain knowledge and doesn't scale well. The authors aim to create an automated, dynamic curriculum that can bootstrap an RL agent from zero knowledge to solving PSPACE-complete planning nightmares.

Methods

The authors build an AlphaZero-style RL agent (using Monte Carlo Tree Search guided by a policy/value neural network) and train it using a completely automated curriculum framework.

Automated Curriculum Framework
  1. Sub-instance Creation: To give the agent easier problems to practice on, the system automatically generates "sub-instances" of a hard level by simply reducing the number of boxes and goals (e.g., a 2-box version of a 10-box puzzle).
  2. Difficulty Quantum Momentum (Bandit Strategy): Instead of randomly sampling these sub-instances, the authors use a multi-armed bandit algorithm to select training batches. The bandit tracks the agent's success/failure rate on each sub-task. It assigns high selection weights to tasks where the agent's current outcome differs from its history—meaning the task is right on the "edge of solvability." It ignores tasks that are too easy (always solved) or too hard (always failed).
  3. Curiosity-Driven Exploration: They augment the MCTS with Random Network Distillation (RND) to provide intrinsic rewards, encouraging the agent to explore novel board states rather than pushing boxes in circles.
  4. Graph Neural Networks (GNNs): Instead of standard Convolutional Neural Networks (CNNs), the authors represent the board as a graph. This allows the network to easily process boards of varying sizes and wall layouts.

Datasets

The authors evaluated their approach using a large repository of Sokoban problems (from the XSokoban test suite and sokobano.de):

  • The Target Set: 225 instances labeled "Solved by none." These are incredibly hard levels that four modern, specialized Sokoban solvers failed to solve within a 10-minute time limit.
  • The Practice Set: 3,137 additional instances that are solvable by existing solvers. The authors use these purely as unlabeled "practice" environments to smooth out the curriculum pool (they do not use the ground-truth solutions).

Key Insights and Ideas

  • The "Edge of Solvability" is the best teacher: The multi-armed bandit naturally discovers that training is most effective when the agent practices on tasks it just barely knows how to solve.
Bandit Selection Probabilities Over Time

As the agent gets smarter, the bandit automatically shifts the curriculum toward sub-instances with more boxes, smoothly guiding the agent to mastery.

  • GNNs unlock cross-level generalization: CNNs work fine when training on sub-instances of a single board layout. But when the authors mixed entirely different levels into the training pool, CNNs failed to generalize. GNNs, by treating the board as a network of connected nodes, allowed the agent to transfer structural knowledge across completely different puzzle layouts.
  • Unsupervised "cross-training" works: Adding the 3,137 unrelated, solvable instances to the training pool acted like cross-training. Even without knowing the solutions to these extra levels, simply letting the agent practice on them smoothed out the difficulty curve and boosted the agent's ability to solve the 225 ultra-hard target levels.

Key Results

The automated curriculum strategy yielded massive improvements over baseline RL and traditional solvers:

  • Baseline (CNN + uniform random sampling): Solved 30 out of 225 hard instances (13%).
  • Adding Curiosity & GNNs: Solved 72 instances (32%).
  • Adding the Bandit Strategy: Solved 115 instances (51%).
  • Mixing all hard instances + 3,137 practice instances: Solved 179 out of 225 instances (80%).
  • Compared to State-of-the-Art: The RL agent successfully uncovered plans requiring over 200 steps. The authors analyzed the scaling of top-tier specialized solvers (like Sokolution and Fast Downward) and estimated that finding a 210-step solution would take Sokolution over 680 days, and Fast Downward over 50 billion years of compute time.

Limitations and Future Work

  • Limitations: While the bandit strategy is domain-agnostic, the method of generating sub-instances (removing boxes/goals) relies on the specific structure of Sokoban. Adapting this sub-task generation to other domains (like program synthesis) might require domain-specific logic. Additionally, the training process is computationally heavy, requiring up to 12 hours on a 5-GPU machine per instance in the isolated setups.
  • Future Work: The authors suggest applying this automated curriculum to other hard combinatorial AI planning tasks. They also note an interesting broader impact: the "difficulty quantum momentum" strategy mirrors human learning. Future work could explore using similar edge-of-solvability bandit algorithms to design automated tutoring systems and educational curricula for humans.

Summary updated

BibTeX
@inproceedings{feng2020novel,
  author = {Dieqiao Feng and Carla P. Gomes and Bart Selman},
  title = {{A Novel Automated Curriculum Strategy to Solve Hard Sokoban Planning Instances}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=W5xk2IaZlM},
}
Figure