Introduction
Procedural Content Generation via Machine Learning (PCGML) has traditionally relied on models like GANs and VAEs to learn the latent representations of game levels. While effective at capturing style, these models often lack direct controllability. Designers wanting specific features—such as a high density of enemies or a lack of gaps—typically must employ computationally intensive post-hoc evolutionary search algorithms to find suitable latent vectors. This paper introduces a more direct approach using Conditional Variational Autoencoders (CVAEs) to provide real-time control over level generation.
Methodology: Conditional Generation
The authors propose conditioning the generative model on specific labels during training, effectively giving designers "dials" to manipulate the output. They trained CVAEs on 16x16 tile segments from classic NES platformers: Super Mario Bros. (SMB), Kid Icarus (KI), and Mega Man (MM).
Three distinct labeling strategies were employed:
- Game Elements: Binary vectors representing the presence of items like pipes, coins, or ladders.
- Design Patterns: Labels for structural motifs such as "Pipe Valley" or "Stair Up."
- Game Blending: Vectors identifying the source game, allowing for the mixing of different game "DNAs."
Key Insights
Direct Controllability and Co-Creation
By using CVAEs, designers can toggle specific elements by simply flipping bits in the input label. This allows for rapid iteration; a designer can encode an existing segment, change the label from "no enemies" to "enemies," and decode it to receive a modified version that retains the original's structural integrity.
Zero-Shot Game Blending
One of the most compelling features of this approach is the ability to blend games. By feeding the model a multi-hot label (e.g., a combination of SMB and MM), the CVAE generates novel segments that logically combine elements from both, such as Mario-style pipes integrated with Mega Man's ladder-heavy verticality.
Architecture and Data Constraints
Interestingly, smaller latent spaces (32 dimensions) outperformed larger ones (64 or 128 dimensions) in accurately reflecting the requested labels. However, the model's reliability is closely tied to the training data; it struggles with rare or non-existent label combinations, highlighting a "data frequency bottleneck."
Results and Performance
The 32-dimensional model achieved the highest exact match rates for requested elements, with Kid Icarus segments being the most controllable (~50.7% match). To validate game blending, the authors used a Random Forest classifier. When prompted with blended labels, the classifier's predictions were distributed across the parent games, confirming that the visual styles were successfully merged. Statistical metrics (E-distance) further verified that blended levels occupied a mathematical space between the parent distributions.
Conclusion and Future Work
While the current system is limited to 16x16 segments and struggles with rare label combinations, it represents a significant step toward real-time, controllable PCG. Future work aims to combine CVAEs with evolutionary search to handle rare labels and integrate these segments into sequential models for full-level generation. The ultimate goal is to provide these models as interactive tools for human designers.
Summary updated