Project Proposal:


HomeProject MilestoneProject Report


Current Approaches to Procedural Generation

There are a variety of games that rely heavily on procedural generation. Games like Minecraft and No Man’s Sky use finely tuned randomization algorithms to create non-repeating environments that still follow basic game structure. This provides the users with an essentially infinite canvas to play the game on.

Randomly generated minecraft terrain

random generation can have glitches

Dungeon crawlers use similar randomisations to create very simple, usually symmetric and linear dungeon structures to keep the player engaged for long periods. More complex games, however, such as games with non-linear structures, like DOOM, Portal, Mario, most roguelikes, which allow players more options in terms of gameplay and involve problem-solving require hand-crafted levels as randomised generation can produce either repetitive and eventually boring levels or they may produce levels that are bizarre and unplayable.


Previous attempts at PCGML

Other projects have tried to implement machine learning to create new levels for games like Mario and DOOM. These projects have relied on Generative Adversarial networks which have been shown to be successful at recreating convincing new versions of pre-existing data points.
The results of a well-implemented GANs system should be virtually indistinguishable from human-generated versions. So, training GAN’s on a set of hand-crafted levels should be capable of producing new levels that resemble human-generated ones.


Datasets

Games already have a decent number of levels that come with vanilla versions. However, this training data may not be enough or it may not be exhaustive in terms of what is possible to create. Luckily there is a healthy number of games that allow community participation and make level creation tools available. Such games have a significantly larger amount of data available made by players around the world.
The main difficulty then is, how do we encode this level data in such a way that it could be input into an ML algorithm.


Screen Capture

For simple tile-based 2D games, the simplest way is to take a screen capture and write a program that reads the values of each tile and then input that into a text file that would be suitable for the algorithm.


labelled mario tiles

This method isn’t possible for 3D games. 3D levels are harder to encode, one approach can be to split the level in different parts like the floor map, height map, entity map etc. evolve each of those separately and then combine to create the final level.

Inside a Doom 1 level


Our Approach and Proposed Timeline

The Game

We plan on implementing PCGML(Procedural Content Generation using Machine Learning) in the game Portal 2. The game is a challenging 3D puzzle-solving game with very simple mechanics. To complete a level the player needs to escape the testing chamber, the exit is controlled by buttons present in the chamber, the player has to use the portal gun and the environment to press all the required buttons to open the door. The level complexity range is quite large, levels rely on the geometry of the room and the entities placed in it.

Inside a portal level


The game has a story mode where the levels are made by the game devs, these are handcrafted and often contain artistic elements that might be too complex to encode. The game, however, also has a mode called the “Perpetual Testing Initiative” the point of which is to expand the number of testing chambers by allowing players to create new ones, so that the testing can go on infinitely. The components of these chambers are all standardized and can be encoded into usable data.

level editor in Portal


These characteristics make this game ripe for the implementation of PCGML both technically and thematically.


Encoding

The game has a custom made and free level editor where we can edit every detail of the level. The goal is to create a translational layer to extract the position and orientation of all entities along with any accompanying properties they might have. The creation of this translational layer might be very complex depending upon how the level files store this information.


Proposed Timeline

References:

  1. Volz et. al., “Evolving Mario Levels in the Latent Space of a Deep Convolutional Generative Adversarial Network”, in Proceedings of the Genetic and Evolutionary Computation Conference, pp. 221-228 (2018)

  2. Giacomello et. al., “DOOM Level Generation using Generative Adversarial Networks”, 2018 IEEE Games, Entertainment, Media Conference (GEM), pp. 316-323, (2018)

  3. Irfan et. al., “Evolving Levels for General Games Using Deep Convolutional Generative Adversarial Networks”, in 11th Computer Science and Electronic Engineering (CEEC), pp. 96-101 (2019)

  4. Juraska et. al., “ViGGO: A Video Game Corpus for Data-To-Text Generation in Open-Domain Conversation”, in Proceedings of the 12th International Conference on Natural Language Generation, pp. 164-172, (2019)