mlsanityData to 7 Oct 2026

Distilling Game Code World Model Generation into Lightweight Large Language Models

arXiv 2605.24375 ↗First posted 23 May 2026cs.AIcited by 4

On the map: World models → World models for language agents

Abstract (arXiv)

Large Language Models (LLMs) have shown great ability in generating executable code from natural language, opening the possibility of automatically constructing environments for AI agents. Recent work on Code World Models (CWMs) demonstrates that LLMs can translate game rules into Python implementations compatible with solvers like Monte Carlo Tree Search. We study this problem in game settings, where generated environments must implement rules, legal actions, state transitions, observations, and rewards. We refer to these game-specific executable models as Game Code World Models (GameCWMs). However, current approaches to generating code world models rely on frontier models and inference-time refinement loops, limiting accessibility and scalability. This work investigates whether GameCWM generation capabilities can be distilled into smaller models through post-training. We introduce: (1) a curated dataset of 30 games spanning perfect and imperfect information games, (2) a verification framework that evaluates generated code against structural and semantic game properties, and (3) a post-training pipeline combining Supervised Fine-Tuning (SFT) with Reinforcement Learning with Verifiable Rewards (RLVR). We experiment with Qwen2.5-3B-Instruct and find that SFT can increase syntactic correctness, while RLVR can improve execution-level adherence to game rules, thereby improving Qwen's ability to generate valid GameCWMs in both perfect and imperfect information games. Overall, our pipeline makes Qwen2.5-3B-Instruct more capable of generating valid GameCWMs, thereby offering a scalable path toward automatic environment generation from natural language.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Placed in World models for language agents, one of 11 directions in World models. Builds on 18 of its 44 references that are in the map. First posted on arXiv 23 May 2026.

Builds on

18 of 44 references.

Closest ancestors · 4

Same direction, newest first

  1. 2025Why Do LLM Agents Fail in Exploring New Environments? A World-Modeling Perspective16 Oct
  2. 2025Code World Models for General Game Playing6 Oct
  3. 2023Exploring Large Language Models for Communication Games: An Empirical Study on Werewolf9 Sep
  4. 2023Generative Agents: Interactive Simulacra of Human Behavior7 Apr

Other references · 14

  1. 2017Proximal Policy Optimization Algorithmscited by 14,441
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  3. 2023LIMA: Less Is More for Alignmentcited by 1,080
  4. 2024Tulu 3: Pushing Frontiers in Open Language Model Post-Trainingcited by 988
  5. 2023SOTOPIA: Interactive Evaluation for Social Intelligence in Language Agentscited by 350
  6. 2019OpenSpiel: A Framework for Reinforcement Learning in Gamescited by 180
  7. 2023ChessGPT: Bridging Policy Learning and Language Modelingcited by 73
  8. 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoffcited by 50
  9. 2025Advancing Multimodal Reasoning via Reinforcement Learning with Cold Startcited by 41
  10. 2024Steering Language Models with Game-Theoretic Solverscited by 28
  11. 2025Measuring General Intelligence with Generated Gamescited by 21
  12. 2025From Natural Language to Extensive-Form Game Representationscited by 6
2 more
  1. 2025Model-First Reasoning LLM Agents: Reducing Hallucinations through Explicit Problem Modelingcited by 2
  2. 2026A Generalizable Framework for Building Executable Domain-Specific LLMs under Data Scarcity: Demonstration on Semiconductor TCAD Simulationcited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 4.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Generating Code World Models with Large Language Models Guided by Monte Carlo Tree Search
  2. 2026Modular Discovery of General Game-Playing Algorithms with Large Language Models
  3. 2026Reasoning Capabilities of Large Language Models. Lessons Learned from General Game Playing
  4. 2026OptiArena: Can LLMs Improve Executable Algorithms under Fixed Resource Budgets?
  5. 2023ByteSized32: A Corpus and Challenge Task for Generating Task-Specific World Models Expressed as Text Games
  6. 2025Learning Game-Playing Agents with Generative Code Optimization
  7. 2025ByteSized32Refactored: Towards an Extensible Interactive Text Games Corpus for LLM World Modeling and Evaluation
  8. 2024Large Language Models as Agents in Two-Player Games