Context Tree Maximizing

Phuong Nguyen, Peter Sunehag, Marcus HutterAAAI 2012

Introduction

Standard Reinforcement Learning (RL) algorithms typically assume an environment is a Markov Decision Process (MDP), where the current observation provides sufficient information for decision-making. However, real-world scenarios are often non-Markovian due to partial observability. To address this, agents must leverage their history of past observations and actions. This paper introduces CTMRL (Context Tree Maximizing Reinforcement Learning), a novel approach that analytically identifies optimal state representations to bridge the gap between theoretical feature RL and practical applications.

The Challenge of Non-Markovian Environments

In non-Markovian settings, agents must map their history to a compact state representation. Previous frameworks like $\Phi$MDP and MC-AIXI-CTW have attempted this with varying success. $\Phi$MDP relies on slow stochastic searches, while MC-AIXI-CTW uses a computationally intensive Bayesian mixture of context trees, requiring thousands of Monte Carlo simulations per step. The primary challenge is finding a history-based state representation efficiently enough to scale to complex domains.

The CTMRL Approach

CTMRL combines the structural mapping of $\Phi$MDP with the predictive power of Context Tree Maximization (CTM). Its key innovations include:

  • Context Tree Maximization (CTM): Instead of a complex mixture, CTMRL analytically finds the single best tree using the Minimum Description Length (MDL) principle. This creates an optimal trade-off between model complexity and predictive accuracy.
  • Binary Factorization: By binarizing observations, actions, and rewards, CTMRL builds separate trees for each bit, uncovering granular patterns that might be missed at a higher level.
  • Decoupled Learning and Planning: CTMRL uses the learned context tree to define an MDP and then applies Action-Value Iteration (AVI) and Q-learning. This shift from heavy online planning to offline-style updates significantly improves execution speed.

Experimental Evaluation

The algorithm was tested on several benchmarks, including Cheese Maze, Tiger, Kuhn Poker, and a large-scale Pacman domain.

Performance of CTMRL and baselines on the Cheese Maze benchmark.

In the Cheese Maze navigation task, CTMRL demonstrates rapid convergence to the optimal reward, outperforming several history-based baselines like U-tree and Active-LZ.

Key Results

The most significant finding is the massive computational speedup offered by CTMRL. In the Cheese Maze, CTMRL completed the task in 27 minutes, compared to 12.5 hours for MC-AIXI-CTW. In the complex Pacman domain, CTMRL reached a high-quality policy in 18 hours, while its competitor required a full week on superior hardware.

Comparison of average reward over time between CTMRL and MC-AIXI, highlighting the significant speedup.

Despite the speedup, CTMRL maintains competitive performance quality, achieving rewards nearly identical to or better than state-of-the-art methods across all tested domains.

Conclusion

CTMRL demonstrates that the MDL principle is a highly effective heuristic for state abstraction in RL. By replacing stochastic searches and heavy online planning with analytic context tree maximization, CTMRL provides a scalable solution for non-Markovian environments. While it may be slightly less data-efficient than Bayesian approaches in some cases, its computational efficiency makes it a powerful tool for large-scale reinforcement learning.

Summary updated

BibTeX
@inproceedings{nguyen2012context,
  author = {Phuong Nguyen and Peter Sunehag and Marcus Hutter},
  title = {{Context Tree Maximizing}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2012},
  doi = {10.1609/aaai.v26i1.8310},
}
Figure