Papers
Topics
Authors
Recent
Search
2000 character limit reached

GAN-Based Content Generation of Maps for Strategy Games

Published 7 Jan 2023 in cs.LG | (2301.02874v1)

Abstract: Maps are a very important component of strategy games, and a time-consuming task if done by hand. Maps generated by traditional PCG techniques such as Perlin noise or tile-based PCG techniques look unnatural and unappealing, thus not providing the best user experience for the players. However it is possible to have a generator that can create realistic and natural images of maps, given that it is trained how to do so. We propose a model for the generation of maps based on Generative Adversarial Networks (GAN). In our implementation we tested out different variants of GAN-based networks on a dataset of heightmaps. We conducted extensive empirical evaluation to determine the advantages and properties of each approach. The results obtained are promising, showing that it is indeed possible to generate realistic looking maps using this type of approach.

Citations (3)

Summary

  • The paper demonstrates that using GANs, particularly WGAN and ProgGAN, significantly improves map realism compared to traditional PCG methods.
  • The study evaluates various GAN architectures, revealing ProgGAN's efficiency and high-resolution detail generation with complex landscapes.
  • The work emphasizes effective dataset handling from DEM files by augmenting heightmaps to optimize the GAN training process.

GAN-Based Content Generation of Maps for Strategy Games

Introduction

The paper "GAN-Based Content Generation of Maps for Strategy Games" (2301.02874) addresses the challenge of generating realistic and visually appealing maps for strategy games using Generative Adversarial Networks (GANs). Traditional Procedural Content Generation (PCG) methods, like Perlin noise, often produce maps that lack natural and complex features. To counter this, the authors propose a GAN-based model capable of generating maps with intricate landscape details, enhancing the strategic depth of gameplay.

GAN Architectures Explored

The study evaluates several GAN architectures, including DCGAN, WGAN, ProgGAN, and VAE + WGAN, to identify the most effective approach for map generation.

DCGAN

DCGAN serves as the baseline model, employing architectural modifications such as strided convolutions instead of pooling layers and batch normalization to stabilize learning. Despite these enhancements, DCGAN is limited by issues like mode collapse and vanishing gradients, resulting in lower fidelity map outputs. Figure 1

Figure 1: DCGAN's Generator Model

Figure 2

Figure 2: DCGAN's Discriminator Model

WGAN

WGAN introduces a Wasserstein loss function that provides a stable training process by facilitating a continuous improvement of the generator even when the discriminator reaches optimality. This model significantly outperforms DCGAN by generating maps with recognizable geographic features, such as peninsulas and mountain ranges. Figure 3

Figure 3: Left: Wasserstein estimate for C real and fake images and G generated images during the training phase; Right: Difference between the C Wasserstein estimate of the real images and the fake images

ProgGAN

ProgGAN employs a technique of progressively increasing the image resolution during training, allowing the generator and discriminator to learn fine-grained details incrementally. This approach yields high-quality maps in reduced training times, maintaining the structural complexity found in real-world landscapes. Figure 4

Figure 4: ProgGAN's Generator Model

Figure 5

Figure 5: ProgGAN's Critic Model

VAE + WGAN

The combination of Variational Autoencoders (VAE) and WGAN aims to leverage the encoder's ability to capture latent representations of the dataset to improve WGAN's performance. Although conceptually promising, this method did not meet expectations due to the sub-optimal quality of generated maps. Figure 6

Figure 6: VAE + WGAN architecture. Train the VAE (1) to learn the representation of the Heightmap dataset. Then use the sample vector zz created from the distribution's mean and standard deviation to train the WGAN (2). The VAE's decoder will be the generator of the WGAN.

Dataset and Preprocessing

A key component of the research involves the creation of a dataset of heightmaps derived from Digital Elevation Model (DEM) files with global coverage. The preprocessing steps include adjusting image brightness and applying augmentation techniques to increase dataset size without introducing artifacts that might mislead the GAN training process. Figure 7

Figure 7: Heightmap of the planet Earth after joining the DEM files together

Results and Discussion

Through exhaustive experimentation, the authors conclude that while DCGAN and VAE + WGAN provide lesser quality outputs, WGAN and ProgGAN are highly effective for this task. ProgGAN, in particular, demonstrates superior training efficiency and the ability to produce maps with high resolution and diverse features. Figure 8

Figure 8: Images generated by WGAN after training, in the several experiments

Conclusion

The research successfully demonstrates that GANs, particularly WGAN and ProgGAN, are viable tools for generating complex and realistic maps for strategy games. These models not only enhance the visual appeal but also contribute to a richer strategic gameplay experience. Future work could explore further optimizing these models and scaling to higher resolutions, potentially utilizing more powerful hardware resources.

Paper to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.