From Gameplay Traces to Game Mechanics: Causal Induction with Large Language Models
Mohit Jiwatode, Alexander Dockhorn, and Bodo Rosenhahn

TL;DR
This paper explores how Large Language Models can reverse-engineer game mechanics from gameplay data by inferring causal models, leading to more accurate and consistent game descriptions than direct code generation methods.
Contribution
It introduces a two-stage causal induction approach using LLMs to infer game rules from gameplay traces, improving accuracy over direct generation methods.
Findings
SCM-based approach outperforms direct code generation in accuracy
Preference win rates reach up to 81% in blind evaluations
Learned SCMs enable causal reinforcement learning and game generation
Abstract
Deep learning agents can achieve high performance in complex game domains without often understanding the underlying causal game mechanics. To address this, we investigate Causal Induction: the ability to infer governing laws from observational data, by tasking Large Language Models (LLMs) with reverse-engineering Video Game Description Language (VGDL) rules from gameplay traces. To reduce redundancy, we select nine representative games from the General Video Game AI (GVGAI) framework using semantic embeddings and clustering. We compare two approaches to VGDL generation: direct code generation from observations, and a two-stage method that first infers a structural causal model (SCM) and then translates it into VGDL. Both approaches are evaluated across multiple prompting strategies and controlled context regimes, varying the amount and form of information provided to the model, from…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsArtificial Intelligence in Games · Explainable Artificial Intelligence (XAI) · Reinforcement Learning in Robotics
