Abstract
Procedural Content Generation (PCG) is vital for creating expansive game worlds but is often limited by the scarcity of high-quality training data. This paper introduces a novel framework that trains a latent diffusion model on a single example to generate complex levels for games like Minecraft and Super Mario Bros. By representing game blocks as semantic embeddings ("block2vec") and restricting the model's receptive field to local patches, the authors achieve superior structural coherence and diversity compared to previous GAN-based methods.
Introduction
High-quality game levels are traditionally hand-crafted, creating a data bottleneck for deep learning models. Current state-of-the-art methods, such as Generative Adversarial Networks (GANs) designed for single-image learning, often struggle with "content incoherence." This results in artifacts like floating blocks in Minecraft or unplayable platforms in Mario. Furthermore, standard "one-hot" encodings for game blocks become computationally expensive as block variety increases.
Methodology
The authors propose a two-stage approach to overcome these limitations:
1. Level Representation (block2vec)
Instead of one-hot encoding, game tokens (blocks) are treated like words in a sentence. A skip-gram model learns dense, 32-dimensional semantic embeddings for each block type. This ensures that tokens appearing in similar contexts (e.g., "oak wood" and "leaves") are closer in latent space, making the data more continuous and easier for a diffusion model to process.
2. Local Latent Diffusion
The framework adapts the Denoising Diffusion Probabilistic Model (DDPM) to work on these embeddings. A key innovation is the modification of the U-Net architecture: by removing all upsampling and downsampling layers, the network's receptive field is restricted to local patches. This prevents the model from memorizing the global layout of the single training example, allowing it to generate new variations of arbitrary sizes.
3. Objective Parametrization
Unlike standard diffusion models that predict added noise ($\epsilon$), this model is trained to predict the original state ($x_0$) directly. This change provides a stable target during training, which is crucial when only one example is available.
Key Results and Insights
The model was evaluated on Minecraft (DREHMAL:PRIMORDIAL map) and Super Mario Bros (VGLC corpus) benchmarks:
- Structural Fidelity: Using the Tile Pattern KL-Divergence (TPKL-Div) metric, the model consistently outperformed previous leaders like World-GAN and TOAD-GAN, matching the internal distribution of the training data more closely.
- Diversity and Playability: The model achieved higher Levenshtein distances between samples, indicating it does not simply "copy-paste" the input. Mario levels generated by this method reached a completion rate of up to 87.8% when tested with pathfinding agents.
- Locality is Key: Turning one large level into a dataset of overlapping local patches is essential for single-example learning. This focus on local distributions ensures stylistic consistency without global overfitting.
Conclusion and Future Work
This diffusion-based approach effectively eliminates common artifacts like "floating blocks" and fragmented shapes. While the iterative nature of diffusion models makes them slower than GANs, the gain in quality and structural coherence is significant. Future research will explore incorporating user guidance or text prompts to allow designers to direct the generation process more precisely.
Summary updated