arXiv:2512.12706cs.AIcs.SE2025-12被引 1

用大模型让游戏测试同时覆盖代码改动和玩法目标,提升测试效率与质量。

Synergizing Code Coverage and Gameplay Intent: Coverage-Aware Game Playtesting with LLM-Guided Reinforcement Learning

  • 利用大模型解析代码差异,提取玩法意图,构建混合奖励机制。
  • 在修改代码上实现超94%分支覆盖率,是传统方法的近两倍。
  • 适合需要频繁更新且注重功能完整性的游戏开发团队使用。

随着“游戏即服务”模式的普及,内容频繁更新给质量保障带来巨大压力。自动化游戏测试被视为应对高频率发布的重要手段。然而现有方法存在二元对立:代码中心型方法关注结构覆盖但缺乏玩法理解;玩家中心型代理能验证高层意图却难以覆盖具体代码变更。为此,我们提出SMART(结构映射增强强化测试)框架,融合结构验证与功能验证。SMART利用大语言模型(LLM)解析抽象语法树(AST)差异,提取功能意图,构建上下文感知的混合奖励机制,引导强化学习代理在完成玩法目标的同时,自适应探索修改的代码分支。我们在Overcooked和Minecraft两个环境中评估SMART,结果表明其显著优于现有最先进基线:在修改代码上实现超过94%的分支覆盖率,接近传统强化学习方法的两倍,同时保持98%的任务完成率,有效平衡了结构完备性与功能正确性。

原文摘要 · Abstract (English)

The widespread adoption of the "Games as a Service" model necessitates frequent content updates, placing immense pressure on quality assurance. In response, automated game testing has been viewed as a promising solution to cope with this demanding release cadence. However, existing automated testing approaches typically create a dichotomy: code-centric methods focus on structural coverage without understanding gameplay context, while player-centric agents validate high-level intent but often fail to cover specific underlying code changes. To bridge this gap, we propose SMART (Structural Mapping for Augmented Reinforcement Testing), a novel framework that synergizes structural verification and functional validation for game update testing. SMART leverages large language models (LLMs) to interpret abstract syntax tree (AST) differences and extract functional intent, constructing a context-aware hybrid reward mechanism. This mechanism guides reinforcement learning agents to sequentially fulfill gameplay goals while adaptively exploring modified code branches. We evaluate SMART on two environments, Overcooked and Minecraft. The results demonstrate that SMART significantly outperforms state-of-the-art baselines; it achieves over 94% branch coverage of modified code, nearly double that of traditional reinforcement learning methods, while maintaining a 98% task completion rate, effectively balancing structural comprehensiveness with functional correctness.

游戏测试强化学习大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。