- The paper introduces a multi-agent pipeline that utilizes explicit mechanic contracts and iterative generation to evolve HTML5 games.
- It employs a CreativeProxyReward system and quantitative metrics to assess mechanic evolution and ensure robust, playable outputs.
- The approach achieves over 98% pipeline success by integrating lineage-aware memory and a mechanic-guided planning loop across multiple game lineages.
Mechanic-Aware Creative Game Generation with CreativeGame
Overview
"CreativeGame: Toward Mechanic-Aware Creative Game Generation" (2604.19926) proposes a multi-agent, lineage-aware system for the iterative generation of HTML5 games, with a distinctive emphasis on explicit mechanic planning, programmatic reward design, cross-version experience accumulation, and integrated runtime validation. The approach directly targets limitations in single-shot LLM-based game generation, including brittle outputs, lack of coherent version-to-version evolution, and subjectivity in creativity assessment.
The paper formalizes games as rule-organized systems, distinguishing between core structural layers (Gcore​: agents, states, actions, transitions, feedback, constraints, outcomes, preferences, challenges) and support layers (Gsupport​: content, representation, meta-data). Creative variation is defined as changes in Gcore​, not merely Gsupport​.
Mechanics are precisely framed as local rule structures m=(ΔA,ΔT,ΔO,ΔF,ΔK,ΔW), with associated existence, importance, and showcase value scores. Mechanic deltas encode the substantive difference between parent and child games, supporting quantifiable and inspectable creativity evaluations.
System Architecture and Pipeline
CreativeGame is structured as a pipeline of seven logical agents, with four internal code-generation sub-roles (Skeleton, Feature, Visual, Refinement) and supporting roles for planning, repair, validation, evaluation, reflection, and output formatting. Iterative code generation is paired with up to three refinement cycles, after which only the final artifact is committed to the lineage tree.
Crucially, the pipeline is grounded in explicit mechanic planning: before code is generated, the planner, informed by a global mechanic archive and per-lineage memory, emits a mechanic contract that specifies which mechanics to preserve, add, remove, or recombine. This contract is subsequently used to guide code generation, frame evaluation, and mediate memory updates.
Mechanic-Guided Planning Loop
The introduction of a mechanic-guided planning feedback loop is central. Mechanics are not only annotated post hoc; they become the actionable objects of planning and evaluation. The explicit interface between planner, code generator, evaluator, and reflection agent ensures that mechanic-level intentions are both tracked and compared to realized behavior in each generation episode.
Reward Design: CreativeProxyReward
To mitigate the subjectivity and saturation of LLM-based scoring, the system introduces the CreativeProxyReward, a deterministic, programmatically defined function that aggregates:
- MechanicRealization: Degree to which planned mechanics are present in the code
- StructuralMechanicChange: Quantifies core mechanic deltas between parent and child versions
- RelativeMechanicNovelty: Based on comparison with a global archive of 774 mechanics
- LLM_Creativity: Down-weighted, auxiliary signal
- RuntimePlayability: Empirically measured code execution quality
- Penalties: Cosmetic-only change and regression are penalized
Rewarding is further gated by hard and soft runtime validation criteria to prevent non-functional but superficially creative-looking outputs from being scored highly. The quantitative dominance of mechanic-aware signals (65% of positive reward) operationalizes the theoretical stance that creativity is structural and mechanic-based, not merely aesthetic or judgmental.
Lineage-Scoped Memory Architecture
Versioning is encoded as explicit lineage trees. Lineage-scoped memory organizes persistent cross-version experience, enabling the system to accumulate, revise, and exploit historically successful mechanic patterns within a lineage, while isolating information across lineages. Memory items are dynamically averaged and prioritized by semantic relevance and value estimates, facilitating the emergence of more complex, learned mechanic usage over time.
Runtime Validation Integration
A two-tiered runtime validator ensures that generated code is not only syntactically plausible but robustly executable. Static analysis targets frequent failure modes specific to HTML5 games (e.g., uninvoked animation loops, improperly scoped event handlers), while optional browser-based execution checks empirically verify playability. These validations act both as reward signals and as repair triggers, tightly coupling generative and evaluative stages.
Empirical Case Studies: Evolution Across Generations
The system's efficacy is illustrated through four replicated evolution lineages—Fireboy and Watergirl, Flappy Bird, Happy Glass, Plants vs. Zombies—each tracked across four generations.
(Figure 1)
Figure 1: All four 4-round evolution lineages displayed as an auto-demo grid. Each column is one generation round (Round 1--4); each row is one source-game lineage. Games run live in browser with injected demo bots; this screenshot captures representative mid-play states.
Key observations:
- Mechanic reinterpretation, rather than cosmetic variation, dominates later versions (e.g., Flappy Bird transitions from obstacle avoidance to route-writing through causal editing of future gates; Plants vs. Zombies evolves from classic tower defense to charge storage and refracted discharge mechanics).
- The planning loop supports the emergence of new mechanic-centered rule structures that are both codified in generation contracts and verifiable in realized code.
- Evolution in mechanic structure becomes a primary lens for interpreting creative generation, rather than surface-level stylistic fidelity.
System Implementation and Empirical Results
The pipeline comprises 6,181 Python LOC, supporting 71 evolution lineages with 88 generated nodes and an extensive mechanic archive. Computational resources are dominated by the visual and evaluation generations, and built-in reliability mechanisms yield a >98% pipeline success rate.
The average creativity and playability scores (~7.0/10 and ~6.5/10) are coarse metrics, but the concrete lineage and mechanic evolution data allow for deeper structural analysis. The approach demonstrates that explicit mechanism tracking and programmatic reward signals can drive interpretable creative change, beyond what is possible with prompt-level LLM sampling.
Theoretical and Practical Implications
The study demonstrates the feasibility and value of formalizing mechanics as the locus of creative generation in games, shifting the evaluative frame from subjective judgment to explicit rule variation. Practically, this enables more robust, compositional, and traceable multi-agent creative systems by combining role specialization, explicit memory architectures, and integrated runtime validation.
Furthermore, the mechanic-guided approach has broad implications for automated content generation pipelines, LLM-driven creative systems, and future alignment of generative agents with verifiable, interpretable criteria for open-ended tasks. The lineage-aware design suggests natural extensions into evolutionary optimization, interpretability analysis, and human-in-the-loop collaborative design.
Future Directions
Several vectors for extension emerge:
- Scalable induction over mechanic archives and lineage records to support meta-learning and long-term novelty detection
- Integration of human preference data or fine-grained player interaction logs for reward refinement
- Expansion to multi-modal or 3D game domains, requiring richer mechanic extraction and formalization layers
- Application of the mechanic-delta framework to other domains where creative structure is decomposable and inspectable (e.g., procedural narrative, simulation design)
Conclusion
CreativeGame introduces a comprehensive, mechanic-centered framework for interpretable, iterative creative game generation. By engineering explicit reward, memory, validation, and planning mechanisms around codified game mechanics, it provides a template for future research in structural creativity, interpretable agent evolution, and autonomous content generation systems.