Diverse Mario-Level Generation with Controllable GANs

Overview of the paper “Illuminating Mario Scenes in the Latent Space of a Generative Adversarial Network” by Fontaine et al.

Chintan Trivedi
deepgamingai

--

So far we have seen a couple of procedural level generation techniques that use Reinforcement Learning or Generative Modeling to automatically design new game levels. Usually, if we try to impose restrictions on the generated levels to control various aspects of the game, the diversity or uniqueness of these levels suffer.

AI-generated Mario Level. [source]

For example, consider a Generative Adversarial Network (GAN) based Mario Level generator. Here, if we wish to control the different aspects of the generated levels like the number of enemies or the height of the tiles or pipes, we tend to suffer in terms of diversity in generated outputs, making it impractical for use in real-world.

So today, I want to share a paper that can generate diverse looking game levels with GANs while controlling the different aspects of the output. The paper is titled “Illuminating Mario Scenes in the Latent Space of a Generative Adversarial Network”. The authors present their results on the classic game of Mario by generating new and unique game levels.

Latent exploration in GAN Level Generator.

This approach uses different evolutionary strategies to learn how to edit the latent space of the GAN level generator. By editing this latent space, we can control different aspects like number of sky tiles, or number of enemies in the level as per our liking. Here, the evolutionary algorithms explored enforce a quality diversity criteria by using metrics such as KL-divergence, so that the generator always gives out sufficiently unique outputs. These metrics help to quantify how visually different two levels are compared to each other. This approach of latent exploration is named Latent Space Illumination (LSI).

Paper’s Results on Diverse Mario Level Generation. [source]

The results in the paper show how we can obtain different levels with low or high number of sky tiles or number of enemies. The line of Mario's seen here shows the path taken by the player while playing this particular generated level. This work significantly advances the field of computer-generated game content, and I can’t wait to see the next big paper in this field!

Thank you for reading. If you liked this article, you may follow more of my work on Medium, GitHub, or subscribe to my YouTube channel.

--

--

Chintan Trivedi
deepgamingai

AI, ML for Digital Games Researcher. Founder at DG AI Research Lab, India. Visit our publication homepage medium.com/deepgamingai for weekly AI & Games content!