NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Thinker: Learning to Plan and Act

Stephen Chung, Ivan Anokhin, David Krueger · DOI

Abstract

Reinforcement learning (RL) agents typically rely on handcrafted search algorithms like Monte Carlo Tree Search (MCTS) to plan using a world model. This paper introduces Thinker, an algorithm that enables agents to autonomously learn how to plan. By framing planning as a sequence of "imaginary" actions within an augmented Markov Decision Process (MDP), Thinker allows an agent to interact with its internal world model to search and evaluate potential futures. Thinker achieves state-of-the-art performance on the complex Sokoban puzzle and competitive results on the Atari 2600 suite, demonstrating that learned planning can be more efficient and flexible than traditional search methods.

Introduction

In model-based reinforcement learning, a "world model" serves as a simulator for an agent to predict the consequences of its actions. Traditionally, navigating these models requires rigid, handcrafted planning algorithms. For instance, AlphaZero and MuZero utilize MCTS to expand search trees. However, these fixed strategies may not be optimal for all environments or for models with inherent inaccuracies.

The ideal agent would learn to plan—autonomously deciding how to consult its internal model, which paths to explore, and how to summarize its findings before committing to a real-world action. Thinker addresses this gap by treating planning as a learned behavior within high-dimensional environments, effectively unifying model-free and model-based RL into a single framework.

Methods

The core of the Thinker framework is the Thinker-augmented MDP. This approach transforms the environment such that planning becomes a set of available actions. For every "real" step in the environment, the agent is granted $K-1$ "imaginary" steps. During these steps, the agent interacts with its internal world model rather than the real environment. It can choose to "unroll" the model to see future states or "reset" its imagination to the current real state to explore alternative trajectories.

Figure 1: Visualization of rollouts in Sokoban, showing imaginary steps and the resulting real state.

The architecture relies on a Dual Network world model. This consists of a state-reward network for predicting transitions and a value-policy network for evaluating state quality. To ensure the model focuses on task-relevant details, the state predictor is trained using a feature loss based on the value-policy network's encodings. To assist the agent in processing its "thoughts," a compact vector of "hints"—such as mean and maximum returns from the current planning session—is provided. The agent is then trained using standard RL algorithms (e.g., IMPALA) to learn a policy for both planning and acting.

Experimental Setup

Thinker was evaluated on two challenging benchmarks:

  1. Sokoban: A classic puzzle game requiring long-horizon strategic planning. The authors used an unfiltered dataset of 900,000 levels.
  2. Atari 2600: A suite of 57 diverse games used to test the general applicability of the algorithm across different dynamics and visual styles.

Results and Discussion

Thinker demonstrated significant improvements over baseline methods. In Sokoban, it achieved a 94.5% solving rate within 50 million frames, vastly outperforming the 56.7% rate of the base RL algorithm. Notably, Thinker matched MCTS performance while using far fewer model simulations (20 steps vs. 1280 for MCTS), suggesting that a learned planning policy is significantly more efficient than brute-force search.

Figure 5: Solving rate of Thinker compared to other baselines on Sokoban.

On the Atari 2600 benchmark, Thinker achieved a median human-normalized score of 261%, compared to 102% for the raw MDP baseline. It was particularly effective in fast-paced games where precise prediction is crucial.

Key insights from the study include:

  • Planning as Internalized Action: By treating planning as actions within an experience-based world model, the framework unifies model-free and model-based RL.
  • Deep and Narrow Search: Thinker agents tend to focus on specific promising paths and quickly reset if they envision a failure, contrasting with the broad search trees typically generated by MCTS.
  • Importance of Hints: Ablation studies showed that summary statistics of the planning session are vital for the agent to maintain context without requiring massive recurrent memory.

Limitations and Future Work

Despite its success, Thinker faces challenges. The $K$ model steps per real step introduce significant computational overhead. Future work could explore dynamic planning budgets, allowing the agent to decide how much "thinking" time is required for a given state. Additionally, adapting the deterministic world model to stochastic environments and moving toward abstract "macro" actions for even longer-term planning are promising directions.

Conclusion

Thinker represents a significant step toward autonomous agents that can reason about their own decision-making processes. By learning to plan, agents can move beyond the limitations of handcrafted search, achieving higher efficiency and better performance in complex, high-dimensional tasks.

Summary updated

BibTeX
@inproceedings{chung2023thinker,
  author = {Stephen Chung and Ivan Anokhin and David Krueger},
  title = {{Thinker: Learning to Plan and Act}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=mumEBl0arj},
}
Figure