Hacker News 中文摘要

RSS订阅

展示HN:AI代理可玩的实时战略游戏 -- Show HN: A real-time strategy game that AI agents can play

文章摘要

LLM Skirmish是一个让大语言模型(LLMs)通过编写代码进行1v1即时战略游戏对战的基准测试平台。模型需要在五轮比赛中根据前轮结果调整策略代码,主要测试其上下文学习能力。该平台灵感来自编程游戏Screeps,旨在充分发挥LLMs的编程优势。

文章总结

标题:LLM Skirmish——大语言模型实时策略对战基准测试

核心内容: 1. 项目概述 - LLM Skirmish是一个创新性基准测试平台,让不同大语言模型通过编写代码策略进行1v1即时战略游戏对战 - 测试重点考察模型的代码能力与上下文学习能力,每场锦标赛包含5轮对战,模型可根据历史战绩调整策略 - 灵感来源于程序员RTS游戏《Screeps》,采用其开源API构建对战环境

  1. 当前排名(截至测试时) | 排名 | 模型 | 胜率 | ELO评分 | |------|--------------------|------|---------| | 1 | Claude Opus 4.5 | 85% | 1778 | | 2 | GPT 5.2 | 68% | 1625 | | 3 | Grok 4.1 Fast | 39% | 1427 | | 4 | GLM 4.7 | 32% | 1372 | | 5 | Gemini 3 Pro | 26% | 1297 |

  2. 测试机制

  • 对战规则:摧毁对方主基地(spawn)或2000帧后按得分判定
  • 初始配置:1个主基地、1个军事单位、3个经济单位
  • 锦标赛设置:5轮循环赛,每轮模型可优化策略,共50场对战
  1. 技术实现
  • 使用开源框架OpenCode构建隔离的Docker测试环境
  • 模型需通过文件编辑、shell命令等工具编写游戏脚本
  • 脚本提交前需通过验证,最多3次修正机会
  1. 关键发现
  • 上下文学习表现:

    • Claude进步最显著(R1→R5胜率+20%)
    • Gemini呈现反常表现(R1胜率70% vs R2-5仅15%)
    • 推测Gemini存在"上下文腐化"问题
  • 成本效益分析:

    • Claude虽表现最佳但成本最高($4.12/轮)
    • GPT 5.2性价比突出(单位美元ELO值高1.7倍)
  1. 模型特点
  • Claude Opus 4.5:后期统治级表现,但初期经济策略存在漏洞
  • GPT 5.2:唯一能后期击败Claude的模型,存在过度编码倾向
  • GLM 4.7:进步曲线陡峭但不稳定,未使用高级战术
  • Grok 4.1 Fast:成本效益比优异(成本仅为顶级模型1/37)
  • Gemini 3 Pro:初期简单策略有效,后期信息处理能力不足

(注:原文中的图片链接、部分技术细节及重复性数据已做精简处理,保留核心测试框架与关键结论)

评论总结

评论总结

1. 对项目的积极评价

  • 观点:多位用户认为项目有趣且有潜力,展示了AI在游戏中的创新应用。
    • 引用:"This is actually fun to watch :D"(hmontazeri)
    • 引用:"Great project! It would be interesting to have a meta layer of AIs betting on the player LLMs"(datawars)

2. 对AI对战实验的兴趣

  • 观点:用户分享了类似的AI对战实验,并讨论了AI的行为和策略。
    • 引用:"I make AI agents develop AI scripts... and try to beat each other"(egeozcan)
    • 引用:"I’ve also been exploring this idea... They can play a web based game via curl"(mitchm)

3. 对可视化效果的批评

  • 观点:部分用户认为游戏的可视化效果较差,单位难以辨识,缺乏直观信息。
    • 引用:"the units are just unnamed roombas with hard to read status indicators"(wongarsu)
    • 引用:"Not exactly a spectator sport"(wongarsu)

4. 对技术改进的建议

  • 观点:用户建议改进AI的实时决策能力,或结合其他AI技术。
    • 引用:"Wouldn’t it be interesting if the LLMs would write realtime RTS-commands instead of Code?"(PeterUstinox)
    • 引用:"Maybe the LLM could be more of a coordinator... by incorporating other types of AI’s"(FrustratedMonky)

5. 对LLM能力的质疑

  • 观点:部分用户对LLM的实际能力表示怀疑,认为其表现被夸大。
    • 引用:"These magic tricks do nothing but convince people... that LLMs are the real deal, when they simply aren’t"(dakolli)
    • 引用:"I swear people... are actually blind to the weaknesses of Gemini"(chimpanzee2)

6. 对项目潜力的展望

  • 观点:用户认为项目为AI评估提供了新方向,可能推动AI竞赛的发展。
    • 引用:"RTS games are a much better testbed for agent capability than most static benchmarks"(david3289)
    • 引用:"I foresee this laying the foundation for whole football stadia filled... with people wanting to watch AI teams compete"(5o1ecist)

7. 与其他项目的类比

  • 观点:用户将项目与历史上的AI竞赛(如StarCraft AI比赛)类比。
    • 引用:"Reminds me of this yearly StarCraft AI competition"(busfahrer)
    • 引用:"Reminds me of the ‘Google AI Challenge’ in 2011 called Ants"(arscan)