Code World Models for General Game Playing
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.
Field roles
Rank sensitivity
Stability: volatile; rank range: 205.
Keyword Scores
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.