代码世界模型:编码智能体作为世界大脑
Code World Model: Coding Agent as World Brain
August 26, 2026
作者: Yiwen Chen, Guosheng Lin, Chi Zhang
cs.AI
摘要
世界模型旨在模拟复杂环境在动作和事件作用下如何演化,然而现有的基于视频的世界模型主要从视觉观测中学习动态,而视觉观测揭示的是结果,而非支配世界演化的底层知识、规则和机制。这使得模型难以维持持久后果,并支持连贯、开放式的演化。我们提出代码世界模型(Code World Model),该框架将世界演化与视觉实现分离,结合语言模型的推理与编码能力以及视频模型的生成先验。编码智能体充当世界大脑,推理事件及其后果,并生成可执行代码以维持持久的世界状态并执行符合规则的演化。为了将可执行状态与视觉生成相连接,我们引入一种代理表示,它对逐帧时空约束进行编码,并将其编译为代理视频,作为视频模型的条件输入,以渲染高保真的视觉观测。我们还开发了数据管线,从游戏玩法和真实世界视频中构建对齐的代理-观测对。在成对游戏数据上微调后,MiniMax-H3 能够遵循编码智能体构建的简单交互世界中基于代理的时空规范,同时保留丰富的视觉细节和动态。这些结果展示了将代码用于持久世界演化与视频模型用于灵活视觉实现相结合的潜力,为开放式世界模型提供了一条新路径。
English
World models aim to simulate how complex environments evolve under actions and events, yet existing video-based world models primarily learn dynamics from visual observations, which reveal outcomes rather than the underlying knowledge, rules, and mechanisms governing world evolution. This makes it difficult to maintain persistent consequences and support coherent, open-ended evolution. We introduce Code World Model, a framework that separates world evolution from visual realization by combining the reasoning and coding capabilities of language models with the generative priors of video models. A coding agent serves as the world brain, reasoning about events and their consequences and generating executable code to maintain persistent world state and perform rule-consistent evolution. To connect executable state with visual generation, we introduce a proxy representation that encodes frame-wise spatiotemporal constraints and is compiled into a proxy video, which conditions a video model to render high-fidelity visual observations. We further develop data pipelines for constructing aligned proxy-observation pairs from gameplay and real-world videos. After fine-tuning on paired gameplay data, MiniMax-H3 follows proxy-based spatiotemporal specifications from simple interactive worlds built by the coding agent while preserving rich visual details and dynamics. These results demonstrate the potential of combining code for persistent world evolution with video models for flexible visual realization, providing a new path toward open-ended world models.