Abstract
Prototyping new card games is a resource-intensive process requiring iterative design, coding, and playtesting. While Large Language Models (LLMs) show promise in creative tasks, they often struggle with generating truly novel mechanics, maintaining code consistency in complex stateful environments, and providing cost-effective gameplay evaluation. This paper presents Cardiverse, a framework that automates the prototyping pipeline. By utilizing graph-based mechanic indexing and an ensemble of code-based AI heuristics, Cardiverse generates playable, novel game variants that are both strategically engaging and computationally efficient to evaluate.
Introduction
Game design is traditionally a human-centric endeavor characterized by high iteration costs. Designers must navigate the "copy-paste" trap, where generative models often replicate existing games rather than innovating. Furthermore, translating natural language rules into bug-free executable code remains a significant hurdle. Finally, evaluating game balance typically requires extensive playtesting, which is prohibitively expensive when using LLMs as active players. Cardiverse addresses these challenges by shifting LLM utility from runtime reasoning to design-time generation and validation.
The Cardiverse Framework
The Cardiverse pipeline consists of three primary stages: mechanic extraction, iterative code validation, and heuristic-based AI generation.
Mechanic Extraction and Indexing
To move beyond simple imitation, Cardiverse represents games as directed graphs. In these graphs, nodes represent specific mechanics (e.g., "Empty hand") and edges denote the logical flow of the game. By clustering these mechanics using text embeddings, the system identifies "functional neighborhoods." Novelty is introduced by replacing standard mechanics with LLM-generated variations that reside within the same functional cluster, ensuring the new game remains playable yet distinct.
Iterative Code Validation
Cardiverse employs a Simulate-Validate-Refine loop to ensure code consistency. Rather than relying on one-shot generation, the system executes the code to produce text-based "gameplay records." The LLM then audits these logs against the original design specifications to identify and fix logic errors. This semantic debugging approach ensures that the final executable code accurately reflects the intended game rules.
Heuristic Ensemble AI for Evaluation
To facilitate low-cost playtesting, Cardiverse generates a pool of Python-based heuristic functions (e.g., "prioritize building melds"). Through a step-wise inclusion strategy and self-play tournaments, the system identifies the optimal combination of these heuristics. This "Code-as-Policy" approach allows for thousands of simulations at near-zero cost, outperforming more expensive LLM-based reasoning agents like ReAct or Reflexion.
Results and Evaluation
Evaluation against a database of 106 common card games demonstrates that Cardiverse successfully generates novel variations with lower similarity scores than baseline methods. The framework achieved over 90% code executability across diverse game genres. Human playtesters rated Cardiverse-generated games as more strategically engaging than those produced by standard prompting techniques. Furthermore, the ensemble-based AI agents achieved a significant win rate advantage (up to 19.7%) over random baselines while remaining computationally efficient.
Conclusion
Cardiverse demonstrates the potential of LLMs to revolutionize game prototyping by combining structured graph representations with iterative code refinement. While current limitations include a focus on single-mechanic variations and a lack of complex opponent modeling (e.g., bluffing), future work aims to expand the framework to more complex genres and deeper human-in-the-loop integration.
Summary updated