Abstract
This paper introduces a fully automatic method of mechanic illumination for general video game level generation. Using the Constrained MAP-Elites algorithm and the GVG-AI framework, this system generates the simplest tile-based levels that contain specific sets of game mechanics and also satisfy playability constraints. We apply this method to illuminate mechanic space for four different games in GVG-AI: Zelda, Solarfox, Plants, and RealPortals.
Introduction
Creating effective tutorials for video games is a complex balancing act. Developers must design levels that are simple enough for beginners to grasp while being specific enough to teach particular mechanics, such as "picking up a key" or "using a portal." Manually designing these pedagogical experiences is tedious, especially in games with numerous interacting systems.
While Procedural Content Generation (PCG) typically focuses on creating endless variations or challenging content, it rarely addresses the pedagogical aspect of teaching a player how to play. Mech-Elites addresses this gap by creating a system that generates levels mathematically guaranteed to trigger specific mechanics during a successful playthrough, ensuring they serve as effective teaching tools.
Methodology: Constrained MAP-Elites
The core of the framework is Constrained MAP-Elites (CME), a "Quality Diversity" algorithm. Unlike standard genetic algorithms that optimize for a single "best" solution, MAP-Elites searches for the highest-quality solution for every possible niche within a defined feature space.
Mechanic Illumination
In this system, the "niches" or dimensions of the map are the game mechanics themselves (e.g., killing an enemy, using a shield). These mechanics are automatically extracted from the game's Video Game Description Language (VGDL) file using the AtDelfi system. By treating each mechanic as a binary dimension (triggered vs. not triggered), the system creates a map of $2^n$ possible combinations.
Constraints and Fitness
To ensure the generated levels are functional, they must satisfy two primary constraints:
- Playability: An AI agent (AdrianCTX) must be able to win the level within a reasonable "ideal time."
- Accessibility: A "do-nothing" agent must not die immediately, ensuring the player has time to react upon starting.
To achieve a tutorial-like aesthetic, the fitness function rewards low tile entropy. This pressure pushes the evolution toward minimalist, clean layouts that clearly demonstrate mechanics without unnecessary distractions or chaotic tile placements.
Results and Key Insights
The system was evaluated across four diverse GVG-AI games: Zelda (dungeon crawler), Solarfox (collection shooter), Plants (tower defense), and RealPortals (puzzle).
- Zelda: The system populated 55 out of 256 possible mechanic combinations. The resulting levels were significantly simpler and more "open" than original human-designed levels.
- Simplicity as a Feature: The use of low entropy successfully automated the design of "tutorial-style" levels. It forced the generator to remove non-essential walls and sprites, leaving only the bare essentials required to trigger the target mechanics.
- Agent-Centric Design: A key finding was that level quality is strictly tied to the intelligence of the evaluation agent. In RealPortals, where the AI struggled with spatial reasoning, the system evolved "trivial" levels that the agent could solve by simply walking to the goal, even if portals were present.
Conclusion and Future Work
Mech-Elites successfully demonstrates that mechanic illumination can automatically generate a diverse library of simple, playable tutorial levels. The biggest current bottleneck is the evaluation agent; more adaptive agents would allow for the generation of more sophisticated puzzles.
Future research will focus on implementing "targeted entropy" to create levels of varying difficulty and testing the system on games that lack a formal description language. Additionally, the authors aim to ensure that mechanics are not just possible to trigger, but required to win the level.
Summary updated