NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning In-Context Adaptivity for LLMs through Continual Gameplay

Jiale Liu, Zun Li, John SchultzarXiv 2026

TL;DR

The paper introduces in-context adaptivity, the ability of LLM agents to improve their decision-making across sequential episodes by learning from experience stored in their context. By evaluating models in repeated poker games, the authors uncover a "memory-doing gap"—where models correctly summarize opponent flaws but fail to act on them—and demonstrate that trajectory-level reinforcement learning can close this gap, enabling a 9B model to outperform frontier models.

What Problem Does This Paper Address?

As LLMs are increasingly deployed as autonomous agents for long-horizon tasks, they need to do more than just follow instructions; they must explore their environment, gather experience, and adapt. While many agent systems use "reflection" or "summarization" to maintain a history of interactions, it hasn't been clear if models actually turn this accumulated context into better decisions over time.

The authors focus on repeated imperfect-information games (specifically Leduc Hold’em and No-Limit Texas Hold’em) as a rigorous testbed. In these games, a static "optimal" strategy (like a Nash equilibrium) is safe but leaves money on the table against flawed opponents. To maximize rewards, an agent must identify and exploit an opponent's specific tendencies—a task that requires genuine in-context adaptivity.

Methods

To isolate the effect of learning from the model's baseline skill, the authors developed a paired evaluation protocol. Each agent plays the same sequence of games twice: once with a persistent memory (continual adaptation) and once where its memory is reset every game. The difference in performance is the "experience gain" ($\Delta_{exp}$).

The paired evaluation protocol isolates experience gain by comparing play with and without memory under identical conditions.

To enable a 9B model (Qwen3.5-9B) to reach frontier-level performance, they used a two-stage post-training recipe:

  1. Supervised Fine-Tuning (SFT): Warm-starting the model on high-quality trajectories from a teacher model (Gemini 3.7 Flash).
  2. Trajectory-Level Reinforcement Learning (RL): Using Group Relative Policy Optimization (GRPO) to optimize for full-match returns. Crucially, they trained the model across multiple "context segments," meaning the model learned to generate summaries and select actions simultaneously to maximize long-term reward.
Trajectory-level RL optimizes for full-match returns across compacted context segments.

Datasets

The study utilizes two primary poker environments:

  • Leduc Hold’em: A compact game that allows for exact game-theoretic analysis and best-response calculation.
  • Heads-Up No-Limit Texas Hold’em (HUNL): A full-scale, complex benchmark with continuous bet sizing.
  • Opponent Pool: A diverse set of 35 opponents, including standard RL/solver baselines and a custom pool of "exploitable" agents created via hand-engineering and evolutionary algorithms (Code-Space Response Oracles).

Key Insights and Ideas

  • The Memory-Doing Gap: This is the paper's most striking finding. Even frontier models like Claude 3.5 Opus are excellent at identifying an opponent's weakness (e.g., "this opponent calls too much") and planning a counter-strategy in their internal summaries. However, they often fail to execute that plan, reverting to default, "safe" play during the actual game.
  • RL as the Execution Bridge: While SFT helps with summarization, it doesn't solve the execution problem. Trajectory-level RL specifically rewards the model for the outcome of its actions over a whole match, forcing it to bridge the gap between its summarized observations and its in-game decisions.
  • Cross-Model Transfer: Interestingly, the RL-trained 9B model can act effectively on summaries generated by other models (like Claude or Gemini). This suggests that RL teaches a general capability to "act on stored observations" rather than just learning a specific note-taking format.
The "memory-doing gap" shows that while models identify opponent flaws, they often fail to switch to the best-response action.

Key Results

  • Closing the Gap: The 9B RL policy doubled the experience gain of the SFT baseline in Leduc Hold’em and increased it fivefold in No-Limit Hold’em.
  • Outperforming Giants: Despite its smaller size, the RL-trained 9B model matched or surpassed frontier models (Claude 3.5 Opus, Gemini 3.1 Pro) across the 35-opponent suite.
  • Generalization: The model's adaptivity generalized beyond its training horizon. Although trained on 20-game matches, it continued to improve and sustain high rewards over 50-game evaluation matches.
Cumulative experience gain shows the 9B RL model significantly outperforming both its SFT version and frontier models in No-Limit Hold'em.

Limitations and Future Work

The authors acknowledge several areas for further exploration:

  • Stationary Opponents: During evaluation, the opponents' policies were held stationary. Real-world scenarios often involve "two-sided" adaptation where both agents are learning and changing simultaneously.
  • Domain Specificity: While poker is a great testbed for strategic reasoning, the "memory-doing gap" likely exists in other agentic domains like multi-session coding or complex tool-use. Extending this training recipe to those areas is a natural next step.
  • Memory Architecture: The study held the reflection-and-compaction harness fixed. Future work could explore co-optimizing the memory structure itself alongside the policy.

Summary updated

BibTeX
@misc{liu2026learning,
  author = {Jiale Liu and Zun Li and John Schultz},
  title = {{Learning In-Context Adaptivity for LLMs through Continual Gameplay}},
  year = {2026},
  eprint = {2611.21710},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.21710},
}
Figure