Thinking Fast and Slow with Deep Learning and Tree Search

Thomas Anthony, Zheng Tian, David Barber

Abstract

Sequential decision making problems, such as structured prediction, robotic control, and game playing, require a combination of planning policies and generalisation of those plans. In this paper, we present Expert Iteration (ExIt), a novel reinforcement learning algorithm which decomposes the problem into separate planning and generalisation tasks. Planning new policies is performed by tree search, while a deep neural network generalises those plans. Subsequently, tree search is improved by using the neural network policy to guide search, increasing the strength of new plans. In contrast, standard deep Reinforcement Learning algorithms rely on a neural network not only to generalise plans, but to discover them too. We show that ExIt outperforms REINFORCE for training a neural network to play the board game Hex, and our final tree search agent, trained tabula rasa, defeats MoHex 1.0, the most recent Olympiad Champion player to be publicly released.

Introduction

In traditional deep Reinforcement Learning (RL), a neural network is often tasked with two difficult jobs simultaneously: discovery (finding a good sequence of moves) and generalization (learning a policy that works across the entire state space). Algorithms like REINFORCE or DQN often struggle with this because they lack a deliberate "lookahead" mechanism during training, leading to slow convergence and high variance.

Drawing inspiration from Daniel Kahneman’s "Thinking, Fast and Slow," this paper introduces Expert Iteration (ExIt). Humans utilize System 1 (fast, intuitive, automatic) and System 2 (slow, deliberate, logical) to solve problems. ExIt addresses the gap in RL where agents lack a strong "System 2" to suggest high-quality policies during the training process itself.

The Expert Iteration Algorithm

The core contribution is the ExIt framework, which sets up a symbiotic relationship between two components:

  1. The Apprentice (System 1): A deep convolutional neural network (CNN) that is fast but lacks lookahead capability.
  2. The Expert (System 2): A Monte Carlo Tree Search (MCTS) algorithm that is slow but produces high-quality plans by simulating future outcomes.
Algorithm 1: The Expert Iteration (ExIt) loop.

The ExIt loop involves two main steps:

  • Imitation Learning: The apprentice is trained to predict the moves the expert would make. The authors use Tree-Policy Targets (TPT), where the network learns the entire probability distribution of the search tree. This makes learning cost-sensitive, helping the network distinguish between catastrophic mistakes and near-equal moves.
  • Expert Improvement: The apprentice’s fast intuitions are fed back into the MCTS. The search uses the neural network to bias its exploration toward promising moves and estimate the value of board positions without needing to play out a full game.

Experimental Results

The agent was trained tabula rasa (from a "blank slate") on a 9x9 Hex board. The most advanced version was trained on a dataset of approximately 7.4 million move choices generated through self-play.

ExIt learned stronger policies significantly faster and with much higher stability than the REINFORCE algorithm. Furthermore, adding a "Value Network" to predict the probability of winning from a state provided a massive boost in search efficiency, allowing the agent to "see" the winner of a game much earlier in the search tree.

Elo rating comparison of ExIt variants against the MoHex benchmark.

As shown in the figure above, the final ExIt-trained agent eventually surpassed the performance of MOHEX 1.0, the reigning Computer Games Olympiad champion for Hex, winning 75.3% of games in a head-to-head match.

Conclusion

ExIt demonstrates that separating planning from generalization allows for more efficient learning in complex domains. By letting the tree search handle the "thinking" and the neural network handle the "generalizing," the system creates a virtuous cycle of improvement. While hardware bottlenecks remain a challenge for real-time comparison against CPU-optimized engines like MoHex, the success on 9x9 Hex suggests significant potential for scaling to larger boards and other sequential decision-making tasks.

Summary updated

BibTeX
@inproceedings{anthony2017thinking,
  author = {Thomas Anthony and Zheng Tian and David Barber},
  title = {{Thinking Fast and Slow with Deep Learning and Tree Search}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
  url = {https://openreview.net/forum?id=S1-bT8WdWH},
}

Loading related content...

Figure