ProxyWar: Dynamic Assessment of LLM Code Generation in Game Arenas

📄 arXiv: 2602.04296v1 📥 PDF

作者: Wenjun Peng, Xinyu Wang, Qi Wu

分类: cs.SE, cs.AI

发布日期: 2026-02-04

备注: ICSE2026

🔗 代码/项目: GITHUB


💡 一句话要点

提出ProxyWar框架以动态评估LLM代码生成质量

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 代码生成 动态评估 游戏环境 自动化测试 多代理系统 算法发现

📋 核心要点

  1. 现有方法主要依赖静态基准和简单指标,无法全面评估LLM生成代码在动态环境中的表现。
  2. ProxyWar框架通过将生成的代码嵌入竞争游戏中,结合多种评估手段,提供全面的代码质量评估。
  3. 实验结果显示,ProxyWar能够揭示基准测试与实际性能之间的差异,为代码生成的改进提供了新的视角。

📝 摘要(中文)

大型语言模型(LLMs)在自动化代码生成方面取得了革命性进展,但其在真实世界中的有效性评估仍受限于静态基准和简单指标。我们提出了ProxyWar,一个新颖的框架,通过将LLM生成的代理嵌入多样化的竞争游戏环境中,系统性地评估代码生成质量。与现有方法不同,ProxyWar不仅评估功能正确性,还结合自动化测试、迭代代码修复和多代理锦标赛,提供程序行为的全面视角。应用于多种最先进的编码器和游戏后,我们的方法揭示了基准分数与动态环境中实际表现之间的显著差异,突显了对代码生成评估的更丰富、基于竞争的需求。

🔬 方法详解

问题定义:本论文旨在解决现有LLM代码生成评估方法的不足,特别是静态基准无法反映动态环境中的实际表现。

核心思路:通过在多样化的游戏环境中嵌入LLM生成的代理,ProxyWar能够综合评估代码的功能性和操作特性,提供更全面的评估视角。

技术框架:ProxyWar的整体架构包括多个模块:首先是LLM生成代码的代理,其次是将这些代理嵌入不同的游戏环境中,最后通过自动化测试和多代理锦标赛评估其表现。

关键创新:ProxyWar的核心创新在于其动态评估机制,结合了自动化测试、迭代修复和竞争性评估,与传统静态评估方法形成鲜明对比。

关键设计:在设计上,ProxyWar采用了多种游戏环境作为测试场景,并通过多代理竞争来评估生成代码的实际表现,确保评估结果的全面性和准确性。

🖼️ 关键图片

fig_0
fig_1

📊 实验亮点

实验结果表明,ProxyWar能够揭示LLM生成代码在动态环境中的表现与基准测试结果之间的显著差异,部分情况下,生成的代码在游戏中的表现优于手工编写的代理,展示了LLM在算法发现和问题解决中的潜力。

🎯 应用场景

该研究的潜在应用领域包括游戏开发、自动化编程和智能代理系统等。通过提供更准确的代码生成评估,ProxyWar可以帮助开发者优化生成算法,提高代码的实用性和可靠性,推动LLM在实际应用中的发展。

📄 摘要(原文)

Large language models (LLMs) have revolutionized automated code generation, yet the evaluation of their real-world effectiveness remains limited by static benchmarks and simplistic metrics. We present ProxyWar, a novel framework that systematically assesses code generation quality by embedding LLM-generated agents within diverse, competitive game environments. Unlike existing approaches, ProxyWar evaluates not only functional correctness but also the operational characteristics of generated programs, combining automated testing, iterative code repair, and multi-agent tournaments to provide a holistic view of program behavior. Applied to a range of state-of-the-art coders and games, our approach uncovers notable discrepancies between benchmark scores and actual performance in dynamic settings, revealing overlooked limitations and opportunities for improvement. These findings highlight the need for richer, competition-based evaluation of code generation. Looking forward, ProxyWar lays a foundation for research into LLM-driven algorithm discovery, adaptive problem solving, and the study of practical efficiency and robustness, including the potential for models to outperform hand-crafted agents. The project is available at https://github.com/xinke-wang/ProxyWar.