TL;DR
This research introduces a visual interface that utilizes look-ahead search trees to explain the decisions of planning-based Reinforcement Learning (RL) agents. By exposing step-by-step predictions and state evaluations, the tool enables experts to pinpoint specific reasoning flaws—such as "hallucinating" impossible game states—even in high-performing agents.
The Challenge of Explaining Planning-Based RL
Most Explainable AI (XAI) for Reinforcement Learning focuses on "reactive" agents, using techniques like saliency maps to highlight which pixels influenced a decision. However, these methods fail to capture the reasoning of planning-based agents (like AlphaZero), which make decisions by simulating future scenarios. While search trees naturally break down complex decisions into human-consumable steps—predicting opponent moves and evaluating future states—these trees are often too massive for manual inspection. This research investigates whether a specialized interface can help humans navigate these trees to identify flaws in an agent's learned models.
Methods: Visualizing the Search Tree
The authors developed a planning-based RL agent to play Tug of War (ToW), a custom StarCraft 2 mini-game. The agent relies on three neural components: a transition model to predict future states, an action ranker to prioritize moves, and a state-value function to estimate win probabilities.
To debug this agent, the researchers designed a two-part explanation tool:
- Replay Interface: A standard viewer for game progression with a timeline of win-probability estimates. Sudden fluctuations in these estimates serve as indicators of potential reasoning errors.
- Tree Explanation Interface: A deep-dive tool that visualizes the agent's minimax search tree at specific decision points. It displays "abstract states" (unit counts, base health), considered actions, and expected outcomes.
Key Insights: Detecting Hallucinations
By using the interface, AI experts identified two primary categories of reasoning flaws that were previously invisible during standard gameplay observation:
- Transition Function Flaws: The agent's internal simulator predicted "impossible physics." For instance, it occasionally predicted that its base health would increase after taking damage or that opponents would spawn units without the necessary infrastructure.
- State Evaluation Flaws: The agent misjudged the value of future states. In some scenarios, it assigned a non-zero win probability to states where its base was already destroyed, leading it to prioritize guaranteed losses over paths with a genuine chance of victory.
Results and Impact
Qualitatively, the tool allowed developers to find non-trivial bugs in learned transition and value models. Quantitatively, the team used these visual discoveries to create automated scripts that scanned thousands of game trees. They found that "base health hallucinations" occurred right before losses in 66% of analyzed games, with the agent overestimating its health by more than 10%, directly causing fatal misjudgments.
Limitations and Future Work
The current approach relies on an "abstract state" (e.g., unit counts) that is inherently human-readable. Applying this to agents using purely latent, uninterpretable mathematical states remains a challenge. Future research will focus on mapping these latent spaces to human-readable formats and developing automated heuristics to flag "suspicious" states within the massive search trees, reducing the manual effort required for debugging.
Summary updated