让AI模拟世界:代码当大脑,视频当眼睛
现在的AI世界模型靠看视频学世界怎么变,但视频只告诉你结果,不告诉你规则。这篇把两件事拆开:让语言模型当“世界大脑”,用代码维护世界状态、按规则推演事件后果;再让视频模型当“眼睛”,把状态翻译成画面。中间用一层“代理表示”把时空约束编码成视频,喂给视频模型渲染。在游戏数据上微调后,模型能按代码设定的规则生成连贯画面。它不是你明天能用上的东西,但指向一个方向:让AI模拟世界不再只是“看起来像”,而是“真的按规则在变”。
📄 原文摘要(英文)
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.