Saved in:
Bibliographic Details
Main Authors: Lehrach, Wolfgang, Hennes, Daniel, Lazaro-Gredilla, Miguel, Lou, Xinghua, Wendelken, Carter, Li, Zun, Dedieu, Antoine, Grau-Moya, Jordi, Lanctot, Marc, Iscen, Atil, Schultz, John, Chiam, Marcus, Gemp, Ian, Zielinski, Piotr, Singh, Satinder, Murphy, Kevin P.
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2510.04542
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915534005600256
author Lehrach, Wolfgang
Hennes, Daniel
Lazaro-Gredilla, Miguel
Lou, Xinghua
Wendelken, Carter
Li, Zun
Dedieu, Antoine
Grau-Moya, Jordi
Lanctot, Marc
Iscen, Atil
Schultz, John
Chiam, Marcus
Gemp, Ian
Zielinski, Piotr
Singh, Satinder
Murphy, Kevin P.
author_facet Lehrach, Wolfgang
Hennes, Daniel
Lazaro-Gredilla, Miguel
Lou, Xinghua
Wendelken, Carter
Li, Zun
Dedieu, Antoine
Grau-Moya, Jordi
Lanctot, Marc
Iscen, Atil
Schultz, John
Chiam, Marcus
Gemp, Ian
Zielinski, Piotr
Singh, Satinder
Murphy, Kevin P.
contents Large Language Models (LLMs) reasoning abilities are increasingly being applied to classical board and card games, but the dominant approach -- involving prompting for direct move generation -- has significant drawbacks. It relies on the model's implicit fragile pattern-matching capabilities, leading to frequent illegal moves and strategically shallow play. Here we introduce an alternative approach: We use the LLM to translate natural language rules and game trajectories into a formal, executable world model represented as Python code. This generated model -- comprising functions for state transition, legal move enumeration, and termination checks -- serves as a verifiable simulation engine for high-performance planning algorithms like Monte Carlo tree search (MCTS). In addition, we prompt the LLM to generate heuristic value functions (to make MCTS more efficient), and inference functions (to estimate hidden states in imperfect information games). Our method offers three distinct advantages compared to directly using the LLM as a policy: (1) Verifiability: The generated CWM serves as a formal specification of the game's rules, allowing planners to algorithmically enumerate valid actions and avoid illegal moves, contingent on the correctness of the synthesized model; (2) Strategic Depth: We combine LLM semantic understanding with the deep search power of classical planners; and (3) Generalization: We direct the LLM to focus on the meta-task of data-to-code translation, enabling it to adapt to new games more easily. We evaluate our agent on 10 different games, of which 4 are novel and created for this paper. 5 of the games are fully observed (perfect information), and 5 are partially observed (imperfect information). We find that our method outperforms or matches Gemini 2.5 Pro in 9 out of the 10 considered games.
format Preprint
id arxiv_https___arxiv_org_abs_2510_04542
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Code World Models for General Game Playing
Lehrach, Wolfgang
Hennes, Daniel
Lazaro-Gredilla, Miguel
Lou, Xinghua
Wendelken, Carter
Li, Zun
Dedieu, Antoine
Grau-Moya, Jordi
Lanctot, Marc
Iscen, Atil
Schultz, John
Chiam, Marcus
Gemp, Ian
Zielinski, Piotr
Singh, Satinder
Murphy, Kevin P.
Artificial Intelligence
Large Language Models (LLMs) reasoning abilities are increasingly being applied to classical board and card games, but the dominant approach -- involving prompting for direct move generation -- has significant drawbacks. It relies on the model's implicit fragile pattern-matching capabilities, leading to frequent illegal moves and strategically shallow play. Here we introduce an alternative approach: We use the LLM to translate natural language rules and game trajectories into a formal, executable world model represented as Python code. This generated model -- comprising functions for state transition, legal move enumeration, and termination checks -- serves as a verifiable simulation engine for high-performance planning algorithms like Monte Carlo tree search (MCTS). In addition, we prompt the LLM to generate heuristic value functions (to make MCTS more efficient), and inference functions (to estimate hidden states in imperfect information games). Our method offers three distinct advantages compared to directly using the LLM as a policy: (1) Verifiability: The generated CWM serves as a formal specification of the game's rules, allowing planners to algorithmically enumerate valid actions and avoid illegal moves, contingent on the correctness of the synthesized model; (2) Strategic Depth: We combine LLM semantic understanding with the deep search power of classical planners; and (3) Generalization: We direct the LLM to focus on the meta-task of data-to-code translation, enabling it to adapt to new games more easily. We evaluate our agent on 10 different games, of which 4 are novel and created for this paper. 5 of the games are fully observed (perfect information), and 5 are partially observed (imperfect information). We find that our method outperforms or matches Gemini 2.5 Pro in 9 out of the 10 considered games.
title Code World Models for General Game Playing
topic Artificial Intelligence
url https://arxiv.org/abs/2510.04542