This story is over 5 years old.


AI Can Generate 'Doom' Levels Now

Algorithms that can make video game levels humans want to play can automate aspects of game design.
Screengrab: YouTube

Doom was a massive hit when it was released for PCs in 1993, and ever since then creating new levels for the game has been a popular pastime for players—now, machines are picking up the hobby, too.

Researchers recently successfully trained neural networks to generate level maps for Doom that, they report in a paper published to the arXiv preprint server in April, “proved to be interesting” to play. The work was carried out by researchers from the Polytechnic University of Milan and used Generative Adversarial Networks, a recent innovation in the field of deep learning. The goal of the technique, ultimately, is to reduce the time it takes to develop games by automating parts of level design and, arguably, letting humans do more creative work.


“Our research is meant to be a step toward intelligent tools to help level designers in generating better levels with less effort, not to substitute them, Edoardo Giacomello, one of the study’s authors, told me in an email. “This allows the designer to focus on more creative and high-level aspects using the generated level as a starting point.”

Read More: Underwater Castle? This AI Creates Never-Before-Seen 'Super Mario Bros.' Levels

Neural networks are algorithms that “learn” patterns in large datasets and then generate new predictions based on what they’ve learned. Generative Adversarial Networks (GANs) provide a powerful generative model, and have been used to generate horrifying faces and even turn winter scenes into summer ones. In a GAN, two neural networks—the generator and the discriminator—are set against each other. The generator is “trained” on input data (in this case, more than 1,000 Doom maps), and it creates new levels based on the model it’s learned. The generator’s goal is to trick the discriminator side of the algorithm, which is satisfied if it believes a Doom map was created by a person and not a computer.

The researchers trained two GANs—one that saw only images of Doom maps, and one that saw images as well as attributes like size, number of rooms, and so on. A dataset containing over 1,000 Doom levels was processed to extract the most vital information; in this case, images depicting key features of the level such as the walkable area, floor height, and objects, and accompanying descriptions.


“Understanding the relevant and most appropriate features of the levels was the biggest challenge for us,” Giacomello told me. “Video game levels have complex structures and you end up having a huge number of values that describe each level, selecting those that work better with the neural network is the real challenge .

This isn’t the first time deep learning has been applied to level design for games. Researchers Mark Riedl and Matthew Guzdial at the Georgia Institute of Technology demonstrated in 2015 that deep learning can generate new Super Mario Bros. levels after watching humans play the game on YouTube. A year later, the pair showed that deep learning can even create mashup levels, like an underwater castle. Even trippier—researchers recently got an algorithm to generate its own hazy “dream” versions of Doom maps and learn to play the game within them.

The model used by the Milan researchers is flexible. Say you wanted to change the AI-generated environment to increase its replayability. It’s easy to implement changes like this, the authors wrote, because the level’s topology is based off a single model that can be adapted and fed into the network again easily and conveniently. According to the paper, this approach could eventually be applied to other tasks like generating non-playable character sprites, so you don’t have to mess with the same five townspeople every time you play Skyrim.

All in all, this work gets us one step closer to a future where large parts of game design are automated, and humans handle the more creative tasks.

Get six of our favorite Motherboard stories every day by signing up for our newsletter .