arXiv:2603.07101cs.AI2026-03被引 1

用游戏设计知识约束大模型,让其自动生成可运行的Unity游戏代码。

Grounding Machine Creativity in Game Design Knowledge Representations: Empirical Probing of LLM-Based Executable Synthesis of Goal Playable Patterns under Structural Constraints

  • 基于游戏设计模式构建中间表示,引导大模型生成符合Unity结构的代码。
  • 在26个目标模式上测试,带中间表示的方案编译成功率达72%,远超直接生成。
  • 发现结构缺失和项目级关联错误是主要失败原因,适合游戏开发与AI结合研究者。

将复杂的玩法构想转化为可执行的成果(如Unity项目和代码),仍是计算游戏创意的核心挑战。游戏设计模式提供了描述玩法现象的结构化表达,帮助设计师将高层想法分解为实体、约束和规则驱动的动力学。其中,目标模式形式化了玩家与目标之间的常见关系。目标可玩概念(GPCs)将这些抽象转化为可运行的Unity实现,支持体验探索与组合式玩法设计。我们把可扩展的可玩模式实现问题建模为受约束的可执行创造性合成:生成成果必须满足Unity的语法和架构要求,同时保留目标模式中编码的游戏语义。双重约束限制了可扩展性。因此,我们探究当代大语言模型(LLMs)能否在引擎级结构约束下完成此类合成,并生成由目标可玩模式结构化和条件化的Unity代码。使用26个目标模式实例,我们在三种中间表示配置和两个开源模型(DeepSeek-Coder-V2-Lite-Instruct 和 Qwen2.5-Coder-7B-Instruct)下,比较了直接生成基线(自然语言 → C# → Unity)与基于人工编写、针对Unity的中间表示(IR)的管道。通过自动化Unity回放评估编译成功率。我们提出‘接地’与‘卫生’失败模式,识别出结构性缺失和项目级接地问题是主要瓶颈。

原文摘要 · Abstract (English)

Creatively translating complex gameplay ideas into executable artifacts (e.g., games as Unity projects and code) remains a central challenge in computational game creativity. Gameplay design patterns provide a structured representation for describing gameplay phenomena, enabling designers to decompose high-level ideas into entities, constraints, and rule-driven dynamics. Among them, goal patterns formalize common player-objective relationships. Goal Playable Concepts (GPCs) operationalize these abstractions as playable Unity engine implementations, supporting experiential exploration and compositional gameplay design. We frame scalable playable pattern realization as a problem of constrained executable creative synthesis: generated artifacts must satisfy Unity's syntactic and architectural requirements while preserving the semantic gameplay meanings encoded in goal patterns. This dual constraint limits scalability. Therefore, we investigate whether contemporary large language models (LLMs) can perform such synthesis under engine-level structural constraints and generate Unity code (as games) structured and conditioned by goal playable patterns. Using 26 goal pattern instantiations, we compare a direct generation baseline (natural language -> C# -> Unity) with pipelines conditioned on a human-authored Unity-specific intermediate representation (IR), across three IR configurations and two open-source models (DeepSeek-Coder-V2-Lite-Instruct and Qwen2.5-Coder-7B-Instruct). Compilation success is evaluated via automated Unity replay. We propose grounding and hygiene failure modes, identifying structural and project-level grounding as primary bottlenecks.

游戏生成大模型Unity可玩模式

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