Manuscript Offprint

arXiv:2610.17310

Beyond Successful Play: Diagnosing Opponent Modeling in Large Language Models

Hanbo Xie, Yue Zhao, Robert C. Wilson

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Language-model agents are expected to adapt to others whose behavior changes through interaction. Yet adaptation may rely on learned behavioral patterns rather than theory of mind (ToM): the ability to infer others' mental states, including beliefs and intentions. We introduce a benchmark and diagnostic framework for repeated hide-and-seek against algorithmic opponents with explicitly defined recursive belief updates. Their ground-truth beliefs and action probabilities let us distinguish adaptive play, action prediction, and belief tracking through live interaction, fixed-history evaluation, and controlled information interventions. With structured elicitation and behavioral supervised fine-tuning (SFT), we find improved play in several tested settings, but diagnostics reveal limitations in opponent prediction and belief tracking. We test whether supervising opponent action probabilities can address this predictive deficit in Qwen2.5-7B-Instruct. Predictions improve when the model is told the opponent's type and parameter settings, but become less accurate when it must infer the opponent from history without this information. Training on examples that also omit these details reduces the gap, although improvements vary across opponents. Is this limitation specific to smaller open-weight models, or does it also appear in a frontier model? GPT-5.4 also benefits from correct opponent beliefs: supplying them improves its predictions and choices, whereas deeper explicit belief reports and self-generated memory do not consistently improve forecasting from interaction history. This contrast suggests that using useful belief information is easier than inferring it autonomously, even for a frontier model. Together, our findings distinguish improved play and action prediction from reliable belief tracking, providing a framework for evaluating mentalizing and testing targeted improvements.

1 Introduction

Large language models (LLMs) are often evaluated for theory of mind (ToM), or mentalizing, through questions about characters' beliefs in fixed narratives (Kosinski, 2024; van Duijn et al., 2023). Mentalizing concerns inference about another agent's latent beliefs, intentions, and goals (Premack & Woodruff, 1978). An expected answer on a familiar task does not rule out learned response patterns or shortcut cues, and small changes to a scenario can alter performance (Ullman, 2023). When a model answers correctly or acts successfully, what evidence supports interpreting that success as mentalizing?

Fixed belief questions hold the evidence constant. In repeated interaction, each action changes both the payoff and the observations available at the next decision, and an opponent that predicts the model can adapt in turn (Devaine et al., 2014a). Thus, success on static questions does not establish online adaptation, while live payoff alone does not establish belief inference: a model may exploit action frequencies or reward regularities. The sharper test is whether a model can infer useful

∗^{*}Equal contribution. Corresponding author: hxie88@gatech.edu.

Preprint.

Figure

Figure 1: From static ToM evaluation to dynamic opponent modeling. (A) Static evaluations ask models to answer belief questions about a fixed narrative. (B) Repeated interaction requires anticipating an adaptive opponent while one's own actions shape subsequent observations. (C) Our evaluation distinguishes opponent action prediction, role-conditioned response, and payoff. The dashed pathway denotes opponent-state inference as a process to investigate, not an established internal mechanism. Explicit prediction is required only in designated evaluation interfaces, not in natural online play.

opponent information from interaction history, rather than merely use it when supplied. Recent LLM studies examine planning and repeated strategic games (Slater et al., 2026; Sohail et al., 2026). We build on them by assessing payoff alongside direct action forecasts and controlled access to opponent information.

We study this distinction in a repeated two-action hide-and-seek game. The seeker benefits from matching the opponent's action, whereas the hider benefits from choosing a different action. This minimal task limits action-search demands while retaining the challenge of anticipating an adaptive opponent. Simple behavioral strategies provide controls for predicting action regularities; in Bayesian k-ToM opponents, k indexes the order of reasoning about other agents, and higher orders have explicit belief updates. These opponents are implemented with tomsup (Waade et al., 2023). The simulator provides reference next-action probabilities and, where defined, reference beliefs. We use opponent information for the broader set of opponent characteristics and simulator states. The opponent specification is the narrower bundle of type, parameters, state schema, and public initialization; it excludes the current state and exact update rules. Natural play withholds both. Designated diagnostics supply selected information. Figure 1 summarizes the task and evaluation.

To organize the evaluation, we consider a functional prediction-to-action chain:

ht⟶q^t⟶BRrole(q^t)⟶atself⟶rt.(1)h_{t}\longrightarrow\hat{q}_{t}\longrightarrow\mathrm{B R}_{\mathrm{r o l e}}(\hat{q}_{t})\longrightarrow a_{t}^{\mathrm{s e l f}}\longrightarrow r_{t}. \tag{1}

For the round-t decision, ht={(asself,asop,rs)}s=1t−1h_t = \{(a_s^{\text{self}}, a_s^{\text{op}}, r_s)\}_{s=1}^{t-1} contains both players' realized actions and the focal player's payoff from completed rounds. The model's forecast q^t\hat{q}_t estimates qtq_t, the simulator's probability that the opponent chooses action 1 at tt. A role-conditioned best response translates that forecast into a preferred choice: matching the opponent's more likely action for the seeker, or avoiding it for the hider. The deployed action, together with the opponent's realized action, determines the round payoff. Observed actions and feedback then extend the history to ht+1h_{t+1}, closing the interaction loop. This decomposition separates forecast quality from choices and outcomes. Natural online play need not produce an explicit prediction or reasoning report.

We combine three evaluations. Live interaction measures payoff as the model's actions shape future histories. Fixed-history tests score forecasts on shared recorded trajectories. Information interventions supply opponent type and parameters or simulator-defined beliefs that are hidden during natural play. These comparisons separate payoff, action prediction, and use of supplied information. Selected belief-state diagnostics compare reports with simulator targets. None of these measures alone identifies the model's internal algorithm, nor do we require natural play to produce an explicit reasoning chain.

Structured elicitation and SFT improve some payoff and forecast measures, but gains depend on information access. Qwen2.5-7B fine-tuning on opponent-action probability performs better with opponent specification; when it is withheld, improvements vary across opponents. With GPT-5.4, supplying simulator beliefs improves predictions and choices, whereas explicit belief reports and self-generated memory do not consistently improve forecasts from history. Across these separate tests, using supplied information is easier to demonstrate than inferring it from interaction.

Our contributions are twofold:

• A controlled benchmark. Against opponents with known update rules, we assess live payoff, action forecasts, and selected belief reports separately.

• A test of inference versus use. Probability-supervised training and information interventions ask whether gains persist when opponent information must be inferred from history.

References (86)