arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.16952cs.HCcs.CL
收藏

实时世界构建:利用大型语言模型从自然语言生成结构化游戏行为

Real-Time World Crafting: Generating Structured Game Behaviors from Natural Language with Large Language Models

University of Exeter Department of Computer Science(埃克塞特大学计算机科学系)

Austin Drake, Hang Dong

AI总结:

提出LLM将自然语言命令转为受限DSL并运行时配置ECS的安全游戏架构,实验比较Gemini、GPT、Claude及提示策略,验证了LLM-ECS模式。

摘要:

我们提出了一种将大型语言模型(LLM)安全集成到交互式游戏引擎中的新颖架构,使玩家能够用自然语言“编程”新行为。我们的框架通过让LLM将命令翻译为受限的领域特定语言(DSL)来降低风险,该DSL在运行时配置自定义的实体-组件-系统(ECS)。我们在一个二维法术制作游戏原型中评估了该系统,通过实验评测了Gemini、GPT和Claude系列模型在多种提示策略下的表现。一个经过验证的LLM评判者对输出进行定性评分,结果表明,虽然较大模型更能捕捉创作意图,但最佳提示策略取决于任务:Chain-of-Thought改善了创作一致性,而少样本示例对于生成更复杂的DSL脚本是必要的。本工作为涌现式玩法提供了经过验证的LLM-ECS模式,并为开发者提供了定量性能比较。

英文摘要:

We present a novel architecture for safely integrating Large Language Models (LLMs) into interactive game engines, allowing players to "program" new behaviors using natural language. Our framework mitigates risks by using an LLM to translate commands into a constrained Domain-Specific Language (DSL), which configures a custom Entity-Component-System (ECS) at runtime. We evaluated this system in a 2D spell-crafting game prototype by experimentally assessing models from the Gemini, GPT, and Claude families with various prompting strategies. A validated LLM judge qualitatively rated the outputs, showing that while larger models better captured creative intent, the optimal prompting strategy is task-dependent: Chain-of-Thought improved creative alignment, while few-shot examples were necessary to generate more complex DSL scripts. This work offers a validated LLM-ECS pattern for emergent gameplay and a quantitative performance comparison for developers.

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

↑