Planning in a recurrent neural network that plays Sokoban

Mohammad Taufeeque, Philip Quirke, Maximilian Li, Chris Cundy, Aaron David Tucker +2 more
7/22/2024
cs.LGcs.AI

No official code found. Best implementation: AlignmentResearch/learned-planner (22 stars, Apache-2.0, last commit 2025-06-29). 1 more below.

Abstract

Planning is essential for solving complex tasks, yet the internal mechanisms underlying planning in neural networks remain poorly understood. Building on prior work, we analyze a recurrent neural network (RNN) trained on Sokoban, a challenging puzzle requiring sequential, irreversible decisions. We find that the RNN has a causal plan representation which predicts its future actions about 50 steps in advance. The quality and length of the represented plan increases over the first few steps. We uncover a surprising behavior: the RNN "paces" in cycles to give itself extra computation at the start of a level, and show that this behavior is incentivized by training. Leveraging these insights, we extend the trained RNN to significantly larger, out-of-distribution Sokoban puzzles, demonstrating robust representations beyond the training regime. We open-source our model and code, and believe the neural network's interesting behavior makes it an excellent model organism to deepen our understanding of learned planning.

View on arXivView PDF

Code Implementations(2)

Apache-2.0

Interpreting Learned Search and Planning: Reverse-engineering recurrent convolutional networks (DRC) that play Sokoban

226Python, DockerfileJul 15, 20241 years agoApache-2.0

Experimenting with CleanRL for learned-planners

93Python, MakefileFeb 2, 20241 years agoNOASSERTION

Similar Papers

Cite this paper

@article{taufeeque2024planning,
  title  = {Planning in a recurrent neural network that plays Sokoban},
  author = {Mohammad Taufeeque and Philip Quirke and Maximilian Li and Chris Cundy and Aaron David Tucker and Adam Gleave and Adrià Garriga-Alonso},
  year   = {2024},
  eprint = {2407.15421},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.15421v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.15421.svg)](https://codeofpaper.com/paper/2407.15421)

Discussion