Awesome World Model Hub Papers · Datasets · Projects
← Back to papers

Code World Models for General Game Playing

arXiv 25.10 2025 59.2 method, application

TLDR

LLMs translate game rules into executable Python world models for verifiable planning with MCTS, avoiding illegal moves and improving strategic depth.

Reasoning

The paper presents a novel approach combining LLMs with formal code generation for game playing, offering verifiability and strategic depth. However, it relies on the correctness of synthesized models and lacks explicit empirical validation in the abstract.

Read-first score

Read-first score 59.2, weighted from topical fit, citation, graph, method, reproducibility, and recency signals. Original total remains 42.

Recency 8%
86.7

Uses a gentle age decay so recent papers surface without erasing older foundations. 2025

Methodology quality 25%
70

Screens visible abstract and analysis fields for experiment, dataset, baseline, metric, and limitation evidence. markers=baseline,evaluation

Topical relevance 42%
60

Uses existing LLM keyword relevance scores normalized to 0-100. world model,world simulator,generative world model,interactive world model,video world model,world dynamics prediction,model-based reinforcement learning world model

Reproducibility 25%
38

Screens links and visible text for paper, code, dataset, artifact, and repository signals. pdf=True; code=False; dataset=False; markers=code

Field roles

FrontierMethodology anchor

Rank sensitivity

Stability: volatile; rank range: 205.

Keyword Scores

world model
10
world simulator
9
world dynamics prediction
8
generative world model
6
interactive world model
5
model-based reinforcement learning world model
4
video world model
0

Deep Analysis

Innovations

  • Using LLM to translate natural language game rules and trajectories into executable Python code (Code World Model) for state transition, legal move enumeration, and termination checks.
  • Combining LLM-generated heuristic value functions and inference functions with Monte Carlo tree search (MCTS) for efficient planning in both perfect and imperfect information games.
  • Verifiability of game rules through formal code specification, enabling algorithmic avoidance of illegal moves.
  • Generalization via focusing the LLM on the meta-task of data-to-code translation rather than direct move generation.

Methodology

The approach uses an LLM to convert natural language game rules and trajectory examples into a Python-based executable world model, including functions for state transitions, legal move enumeration, and termination conditions. This model is then used as a simulation engine for Monte Carlo tree search (MCTS), augmented with LLM-generated heuristic value functions and inference functions for hidden state estimation in imperfect information games. The agent is evaluated on 10 games (4 novel, 5 perfect information, 5 imperfect information) against Gemini 2.5 Pro.

Key Results

The proposed method outperforms or matches Gemini 2.5 Pro in 9 out of the 10 considered games, demonstrating superior strategic depth and verifiability.

Limitations

  • Performance is contingent on the correctness of the synthesized code model; errors in the generated world model can lead to invalid actions or incorrect simulations.
  • Evaluation is limited to 10 games, including 4 novel games, which may not fully represent the diversity of general game playing scenarios.
  • Comparison is made against only one baseline (Gemini 2.5 Pro), limiting the assessment of relative performance across a broader set of methods.
  • The approach may struggle with games that have highly complex or ambiguous rules that are difficult to translate into precise code.

Tags