arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.24375cs.AI
收藏

将游戏代码世界模型生成蒸馏到轻量级大型语言模型

Distilling Game Code World Model Generation into Lightweight Large Language Models

Brown University(布朗大学)

Tyrone Serapio, Arjun Prakash, Haoyang Xu, Kevin Wang, Amy Greenwald

AI总结:

研究通过后训练将游戏代码世界模型生成能力蒸馏到小型模型,采用监督微调和带可验证奖励的强化学习提升生成代码的语法正确性和规则遵循性。

摘要:

大型语言模型(LLMs)在从自然语言生成可执行代码方面展现了强大的能力,为AI代理自动构建环境提供了可能性。最近关于代码世界模型(CWMs)的工作表明,LLMs可以将游戏规则转化为与蒙特卡洛树搜索等求解器兼容的Python实现。我们在游戏设置中研究此问题,其中生成的环境必须实现规则、合法动作、状态转移、观察和奖励。我们将这些特定于游戏的可执行模型称为游戏代码世界模型(GameCWMs)。然而,当前生成代码世界模型的方法依赖于前沿模型和推理时精炼循环,限制了可访问性和可扩展性。本文研究是否可以通过后训练将GameCWM生成能力蒸馏到更小的模型中。我们引入:(1)一个包含30个完美信息和不完美信息游戏的精选数据集,(2)一个评估生成代码的结构和语义游戏属性的验证框架,以及(3)一个结合监督微调(SFT)和带可验证奖励的强化学习(RLVR)的后训练流程。我们在Qwen2.5-3B-Instruct上进行实验,发现SFT可以提高语法正确性,而RLVR可以改善执行层面对游戏规则的遵循,从而提升Qwen在完美信息和不完美信息游戏中生成有效GameCWM的能力。总体而言,我们的流程使Qwen2.5-3B-Instruct更能够生成有效的GameCWM,从而为从自然语言自动生成环境提供了一条可扩展的路径。

英文摘要:

Large Language Models (LLMs) have shown great ability in generating executable code from natural language, opening the possibility of automatically constructing environments for AI agents. Recent work on Code World Models (CWMs) demonstrates that LLMs can translate game rules into Python implementations compatible with solvers like Monte Carlo Tree Search. We study this problem in game settings, where generated environments must implement rules, legal actions, state transitions, observations, and rewards. We refer to these game-specific executable models as Game Code World Models (GameCWMs). However, current approaches to generating code world models rely on frontier models and inference-time refinement loops, limiting accessibility and scalability. This work investigates whether GameCWM generation capabilities can be distilled into smaller models through post-training. We introduce: (1) a curated dataset of 30 games spanning perfect and imperfect information games, (2) a verification framework that evaluates generated code against structural and semantic game properties, and (3) a post-training pipeline combining Supervised Fine-Tuning (SFT) with Reinforcement Learning with Verifiable Rewards (RLVR). We experiment with Qwen2.5-3B-Instruct and find that SFT can increase syntactic correctness, while RLVR can improve execution-level adherence to game rules, thereby improving Qwen's ability to generate valid GameCWMs in both perfect and imperfect information games. Overall, our pipeline makes Qwen2.5-3B-Instruct more capable of generating valid GameCWMs, thereby offering a scalable path toward automatic environment generation from natural language.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑