arXiv · 2611.35702
From Watching to Playing: Auto-Playing Video Games with a Self-Constructed Code World Model
Abstract
Vision-language model (VLM) agents can play video games by selecting actions from successive screenshots, but calling a VLM at each decision step incurs prohibitive time and token costs. Compiling a VLM's game knowledge into reusable code would amortize these costs, yet raw visual gameplay entangles autonomous physics with player actions, obscuring the transition dynamics a compiled model needs. To address both challenges, we present PlaySmith, an agent harness that constructs three modules from visual gameplay. First, a visual Observer detects game objects and tracks them across frames with persistent identity. Second, action-conditioned displacement (ACD) links actions to object motion, guiding construction of a stateful Predictor that distinguishes action-driven motion from autonomous physics. Third, a controller uses the Predictor to evaluate candidate action sequences multiple steps ahead and executes the selected action. Across eight 2D browser games, PlaySmith achieves competitive scores relative to direct VLM gameplay using the same backbone, while consuming no VLM tokens during evaluation episodes per game and reducing mean per-step latency from 4.526 to 0.293 seconds. These results demonstrate that a self-constructed code world model can be more practical than direct VLM play in settings requiring repeated deployment.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Yao Tong, Jiaxin Qi, Yan Cui, Yuhua Zheng, Jianqiang Huang. 2026-11-26. From Watching to Playing: Auto-Playing Video Games with a Self-Constructed Code World Model. https://arxiv.science/abs/2611.35702
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.