Neural Networks Using Doom Level Creator Like It’s 1993

Readers of a certain vintage will remember the glee of building your own levels for DOOM. There was something magical about carefully crafting a level and then dialing up your friends for a death match session on the new map. Now computers scientists are getting in on that fun in a new way. Researchers from Politecnico di Milano are using artificial intelligence to create new levels for the classic DOOM shooter (PDF whitepaper).

While procedural level generation has been around for decades, recent advances in machine learning to generate game content (usually levels) are different because they don’t use a human-defined algorithm. Instead, they generate new content by using existing, human-generated levels as a model. In effect they learn from what great game designers have already done and apply those lesson to new level generation. The screenshot shown above is an example of an AI generated level and the gameplay can be seen in the video below.

The idea of an AI generating levels is simple in concept but difficult in execution. The researchers used Generative Adversarial Networks (GANs) to analyze existing DOOM maps and then generate new maps similar to the originals. GANs are a type of neural network which learns from training data and then generates similar data. They considered two types of GANs when generating new levels: one that just used the appearance of the training maps, and another that used both the appearance and metrics such as the number of rooms, perimeter length, etc. If you’d like a better understanding of GANs, [Steven Dufresne] covered it in his guide to the evolving world of neural networks.

While both networks used in this project produce good levels, the one that included other metrics resulted in higher quality levels. However, while the AI-generated levels appeared similar at a high level to human-generated levels, many of the little details that humans tend to include were omitted. This is partially due to a lack of good metrics to describe levels and AI-generated data.

Example DOOM maps generated by AI. Each row is one map, and each image is one aspect of the map (floor, height, things, and walls, from left to right)

We can only guess that these researcher’s next step is to use similar techniques to create an entire game (levels, characters, and music) via AI. After all, how hard can it be?? Joking aside, we would love to see you take this concept and run with it. We’re dying to play through some gnarly levels whipped up by the AI from Hackaday readers!

[Via Science Magazine]

12 thoughts on “Neural Networks Using Doom Level Creator Like It’s 1993

      1. As far as I’m able to tell, humanity’s ability to robustly describe the things it cares about is _the_ difference between the real world and near-future science fiction. The tools that are out there right now in the real world are capable of being ridiculously competent – but we lack the ability to properly define what we want them to do.

  1. The general process is fine, and the generated level images are convincing. BUT

    I don’t buy the level shown in the video was generated by their GAN. Their paper in no moment talks about the process of turning the output of the GAN (which is the grayscale images in the post) back into a WAD, which is far from trivial, or validating any of the necessary map features (start point, exit, keys for doors accessible from the start) which are clearly visible in the map on the video, and all far from trivial. The point that fully convinced me this was a human constructed map is the symmetric, evenly-spaced red columns in the room near the end. You don’t get that without very specific rewards, and they talk nothing of this.

    At most, and I don’t think I believe even this, they used one of the generated images to manually build a WAD with the same floor plan, and populated the objects manually.

    1. I don’t see how generating levels is far from trivial. There’s tools out there already to convert height maps to terrain data (for zdoom) – https://forum.zdoom.org/viewtopic.php?t=6200

      The “humanness” inferred from the symmetric level design would stem from the learning data, as these levels were originally created by humans. As for level validation, that be from the learning data as well; if the level has a key it would have a corresponding door. The main question in this instance would actually be, how many levels did they work through to find a “validated” working one. There would be a human component to feed back to the GAN that a level is incompletable or could be shortcut/bypassed without a key.

      1. I love the comments section of HaD, I keep finding out about neat stuff.

        I think deep learning / A.I. is not the best possible solution to the problem of making DOOM maps. But if I were to write a thesis paper on the subject of DL/AI and the application of GAN I think making maps for a relatively hackable game like DOOM is a reasonable way to apply and experiment. But it’s less interesting for an trivially simple map structure like Wolf3D or Nethack/Rogue/Bard’s Tale. But I suppose that you can convert heightmaps to BSP does mean that Doom and Wolf3D are equivalent in terms of map structure at that level of abstraction.

        I don’t think the tool is really meant to be directly useful. I view it as a petri dish for experimenting with GANs.

        1. On the other hand a more developed/tweaked version of this program could find a niche in creating unique/one use levels for multiplayer games/tournaments where it’s you or your group against everyone else.

          I wonder if the program could be expanded to include a group of players who test run the top 5 or 10 levels and then rate them, then the top 3 rated levels are fed back into the system to influence the next batch. Hmm, actually that sounds more like a genetic algorithm instead……

  2. I watched the clip without audio since I’m at work killing a little time but its funny, after all the hours I put into playing that when I was younger its like I could still hear all the sound effects in my head. I admit I kind of preferred Wolfenstein to Doom though.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.