The Second Type of Uncertainty in Monte Carlo Tree Search

Thomas M Moerland, Joost Broekens, Aske Plaat, Catholijn M JonkerarXiv 2020

TL;DR

Standard Monte Carlo Tree Search (MCTS) exploration is driven by how many times a node has been visited, but it ignores the size of the subtree remaining to be explored. This paper introduces MCTS-T+, an extension that estimates subtree depth and detects loops to focus exploration on deep, promising paths, significantly improving efficiency in environments with sparse rewards or asymmetric structures.

What Problem Does This Paper Address?

Monte Carlo Tree Search (MCTS) is the backbone of modern AI for games like Go and Chess. It balances exploration (trying new things) and exploitation (following known good paths) using the Upper Confidence Bound (UCB) formula. Traditionally, UCB exploration is based on local visit counts: the fewer times you've visited a node, the more "uncertain" you are about it, and the more you should explore it.

However, the authors identify a "second type" of uncertainty: the size of the subtree below an action. Imagine two doors: one leads to a small closet (a shallow subtree), and the other leads to a massive, unexplored mansion (a deep subtree). If you've peeked into both once, standard MCTS treats them as equally uncertain. In reality, you know almost everything about the closet, but very little about the mansion.

This blind spot causes MCTS to fail in "sparse exploration" problems, such as the Chain domain (Figure 1), where one wrong move ends the episode immediately. MCTS wastes exponential time re-exploring these "dead-end" actions because it doesn't realize their subtrees are already fully enumerated.

Figure 1: Left: Chain domain. At each state we have two available actions: one action terminates the episode with reward 0, the other moves one step ahead in the chain with reward 0. Only the final state terminates the episode with reward 1. Right: Search tree of the Chain domain.

Methods

The authors propose two main enhancements:

  1. MCTS-T (Tree Uncertainty Back-up): They introduce a new variable, $\sigma_\tau(s) \in [0, 1]$, representing the remaining uncertainty of a subtree. A value of 1 means completely unexplored, while 0 means the subtree is fully enumerated. This value is recursively "backed up" the tree. The UCB selection rule is then modified to include $\sigma_\tau$, effectively reducing exploration pressure on actions that lead to small or already-known subtrees.
  2. MCTS-T+ (Loop Detection): They generalize the idea to handle loops (repeated states in a single search trace). A loop is essentially a path that adds no new information. MCTS-T+ detects these loops (using L2-norm distance for continuous states) and treats them as subtrees with zero uncertainty ($\sigma_\tau = 0$).

To ensure that this extra exploration pressure doesn't bias the final value estimates, the authors use a clever "dual-count" system. They track a second set of visit counts ($\tilde{n}$) that simulates how standard MCTS would have behaved, using these for the final value back-ups.

Datasets

The algorithms were evaluated on several benchmarks:

  • Chain Domain: A synthetic task designed to test asymmetric exploration (Figure 1).
  • Cyclic Chain: A variant where the "wrong" action loops the agent back to the start rather than terminating (Figure 4).
  • OpenAI Gym: Classic control tasks like CartPole and the grid-world FrozenLake.
  • Atari Games: Pong and AirRaid, representing more complex visual environments.

Key Insights and Ideas

  • Uncertainty is Global, not just Local: The most important "aha" moment is that uncertainty isn't just a function of how many samples you have, but how many samples are possible.
  • Loops are just "Empty" Subtrees: By framing loops as a special case of subtree depth variation, the authors provide a unified way to handle cycles without needing complex graph-based logic.
  • Efficiency at Low Budgets: The benefits of MCTS-T+ are most pronounced when the "planning budget" (number of traces per step) is small. This makes it highly relevant for real-time robotics or for the "inner loop" of algorithms like AlphaZero, where thousands of small searches are performed.
  • Robustness: If an environment has no early termination (like the mid-game of Go), $\sigma_\tau$ stays at 1, and the algorithm automatically reduces to standard MCTS.

Key Results

  • Solving the Chain: In long Chain domains (length 100), standard MCTS fails completely (zero return), while MCTS-T solves it efficiently. As shown in Figure 3, MCTS-T achieves much higher returns as the chain length increases.
  • Handling Cycles: MCTS-T+ successfully navigates the cyclic chain where both standard MCTS and MCTS-T (without loop detection) fail.
  • General Performance: Across OpenAI Gym and Atari tasks, MCTS-T+ consistently performs equal to or better than standard MCTS, particularly when the number of traces per step is low (Figure 6).
Figure 3: Comparison of vanilla MCTS (red) versus MCTS-T (blue) on the Chain domain of various lengths (progressing horizontally over the plots). Each plot displays computational budget per timestep (x-axis) versus average return per episode (y-axis). Results averaged over 25 episodes. We observe that MCTS-T achieves much higher returns in these domains with asymmetric termination and therefore variation in subtree depth.

Limitations and Future Work

  • The "Needle in a Haystack" Problem: A limitation occurs if a high-reward "sparse" signal is hidden inside a subtree that otherwise looks poor and shallow. MCTS-T might "squeeze out" exploration of that subtree too early. However, the authors note that standard MCTS also struggles in such scenarios.
  • Stochastic Environments: The current work assumes a deterministic environment. Extending $\sigma_\tau$ to handle stochastic transitions (where an action can lead to multiple different subtrees) is a suggested direction for future research.
  • Learned Uncertainty: The authors suggest that instead of manual back-ups, a neural network could be trained to predict the subtree uncertainty $\sigma_\tau$ directly from state observations.

Summary updated

BibTeX
@misc{moerland2020second,
  author = {Thomas M Moerland and Joost Broekens and Aske Plaat and Catholijn M Jonker},
  title = {{The Second Type of Uncertainty in Monte Carlo Tree Search}},
  year = {2020},
  eprint = {2005.09645},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.09645},
}
Figure