Automatic Game Design via Mechanic Generation

Alexander Zook, Mark O. Riedl

Introduction

In the field of Procedural Content Generation (PCG), the majority of research has focused on the automated creation of game content—such as levels, maps, or items—within the confines of pre-existing rules. While algorithms can reliably generate complex levels for games like Super Mario Bros., they rarely address the underlying logic: the mechanics themselves. This paper explores Mechanic Generation, the de novo synthesis of the logical rules that define a game's interactivity.

The Challenge of Mechanic Synthesis

The authors identify two primary hurdles in automating game design:

  1. Design Requirements: The generated rules must be internally consistent and semantically meaningful. For instance, a spell should not simultaneously apply healing and damage effects in a way that nullifies its utility.
  2. Playability Requirements: The mechanics must result in a solvable game. If a system generates a jump mechanic that is insufficient to clear the obstacles it also created, the game is fundamentally broken.

Methodology: Generate-and-Test via ASP

The proposed system treats game mechanics as planning operators, drawing from the Planning Domain Definition Language (PDDL) used in classical AI. Each mechanic is defined by its preconditions (state requirements) and effects (state changes). The architecture utilizes a two-step "generate-and-test" loop implemented through Answer Set Programming (ASP):

  • The Generator (Constraint Solver): This component searches for sets of mechanics that satisfy specific design constraints. These include "hard" constraints (e.g., every action must have a resource cost) and "soft" constraints (e.g., a preference for a smaller, more elegant set of rules).
  • The Tester (AI Planner): Once a rule set is proposed, an AI planner attempts to "play" the game. It seeks a sequence of these new mechanics that reaches a defined goal state (e.g., reaching a flag or defeating an enemy) while maintaining survival conditions.

This symbolic approach allows for cross-domain compositionality, where mechanics from disparate genres—like RPG resource management and platformer spatial movement—can be merged into a single cohesive system.

Results and Discussion

The system was evaluated across three domains: an RPG Battle system, a 2D Platformer, and a hybrid Platformer-RPG. In the RPG domain, the system successfully synthesized balanced spells like DamageAll, which trades higher mana costs for multi-target utility. In the platformer domain, it generated movement rules including jumping and double-jumping.

A playtrace showing a generated mechanic set in a platformer. The orange arrows represent the AI-generated movement mechanics (jump, move, double-jump) used to reach the goal while avoiding the enemy.

As illustrated in Figure 1, the AI planner validates the generated mechanics by finding a path from the initial state to the goal. The orange arrows represent the synthesized movement actions, while the dotted arrows represent environmental constraints like gravity. This trace proves that the generated "jump" and "move" mechanics are sufficient to navigate the environment and avoid the "enemy" tile.

Conclusion and Future Work

While the system demonstrates the feasibility of symbolic mechanic generation, several challenges remain. The computational complexity of the generate-and-test loop currently limits its application to relatively small state spaces. Furthermore, while the system ensures logical playability, it does not yet account for "game feel"—the subjective quality of control responsiveness. Future research may focus on mapping these logical operators to specific input schemes to optimize for player intuition and tactile satisfaction.

Summary updated

BibTeX
@inproceedings{zook2014automatic,
  author = {Alexander Zook and Mark O. Riedl},
  title = {{Automatic Game Design via Mechanic Generation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2014},
  doi = {10.1609/aaai.v28i1.8788},
}
Figure