arXiv:2508.16447cs.LG2025-08被引 4

用大模型直接把文字规则转成可玩的桌游代码,省时省力。

Boardwalk: Towards a Framework for Creating Board Games with LLMs

  • 用自然语言描述规则,让大模型自动生成可运行的桌游代码。
  • 最佳模型Claude 3.7 Sonnet在12个游戏中实现55.6%无错误运行。
  • 适合想快速原型化桌游的开发者或创作者,降低编码门槛。

将桌游编码实现通常耗时费力。然而,大语言模型(LLMs)在仅凭简单上下文信息生成特定领域代码方面已证明有效。本文旨在探究大模型能否从自然语言描述的规则中实现数字版桌游,以推动构建辅助生成桌游代码的框架。我们测试了三种先进大模型(Claude、DeepSeek、ChatGPT)在自由形式与自研通用游戏编程接口Boardwalk下,实现12款流行及冷门桌游的能力。为避免触发模型预训练知识,我们对游戏和组件进行了匿名化处理。实现结果通过可玩性与规则合规性进行评估。结果显示,该方法可行,最佳模型Claude 3.7 Sonnet实现55.6%的无错误率。尽管遵循API会增加错误频率,但错误严重性主要取决于模型本身。文章还提出了未来整合该流程以构建完整框架的路线图,使桌游开发更易获取。

原文摘要 · Abstract (English)

Implementing board games in code can be a time-consuming task. However, Large Language Models (LLMs) have been proven effective at generating code for domain-specific tasks with simple contextual information. We aim to investigate whether LLMs can implement digital versions of board games from rules described in natural language. This would be a step towards an LLM-assisted framework for quick board game code generation. We expect to determine the main challenges for LLMs to implement the board games, and how different approaches and models compare to one another. We task three state-of-the-art LLMs (Claude, DeepSeek and ChatGPT) with coding a selection of 12 popular and obscure games in free-form and within Boardwalk, our proposed General Game Playing API. We anonymize the games and components to avoid evoking pre-trained LLM knowledge. The implementations are tested for playability and rule compliance. We evaluate success rate and common errors across LLMs and game popularity. Our approach proves viable, with the best performing model, Claude 3.7 Sonnet, yielding 55.6\% of games without any errors. While compliance with the API increases error frequency, the severity of errors is more significantly dependent on the LLM. We outline future steps for creating a framework to integrate this process, making the elaboration of board games more accessible.

大模型游戏生成代码生成桌游

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