一句话:提出基于 LLM 与智能体的框架,自动生成 NPC 行为树,提升游戏 AI 开发效率与可及性。
游戏 AI 行为的开发通常依赖复杂的行为树(BT),并需要在源代码与引擎可视化工具之间来回切换,导致非技术成员难以参与、行为多样性不足且不易测试。本文提出一种结合大语言模型(LLM)与智能体(agent)AI 的框架,通过编排多个相互连接的组件,为 NPC 自动构建复杂行为树,从而在源码与可视化工具之间架起桥梁,使技术与非技术相关方都能有效参与开发。该架构被设计为可适配不同游戏引擎,以保证可扩展性与灵活性。作者通过产学合作对方法进行了验证,并出于推广考虑采用可在普通开发者平台上运行的小型模型,无需外部服务或昂贵算力。结果展示了该方法在提升游戏 AI 开发效率、增加可观察行为多样性以及改善可测试性方面的潜力。
Integrating advanced AI behaviors is central to creating immersive and dynamic video game experiences. This paper presents a novel approach to improving AI behaviors in games using Large Language Models (LLMs) and agent-based AI. By orchestrating various interconnected parts, we propose a framework that facilitates the creation of complex behavior trees (BTs) for non-player characters (NPCs). Our method bridges the gap between source code and visual tools in game engines and enables both technical and non-technical stakeholders to effectively contribute to the development process. We also aim to increase the diversity of observable behaviors and testability of games through the same methods. The proposed architecture is designed to be adaptable to different game engines to ensure scalability and flexibility. In a collaboration between industry and academia, we validate our approach and demonstrate its potential to improve game AI development and make it more accessible and efficient. To promote the adoption of the methods, we consider small-sized models that run on typical developer platforms without the need for external solutions or expensive computing resources.