Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.8 KB

README.md

File metadata and controls

45 lines (34 loc) · 1.8 KB

Generating balanced multiplayer game levels with GANs and RL

The main idea of this project was to automatically, with as little input as possible, generate game levels. As a level generation is a rather broad area we focused on a more clearly defined goal. And we decided to train a generator capable of generating boards that are fair for all the players involved in the game.

As a proof of concept, a simple racing game was chosen to be used to evaluate if algorithms work. More details are available in my thesis.

Concept

diagram of a system from the poster

Evaluation & Results

discriminator loss generator loss and tracks


How to run

To run experiments for yourself, you can execute the following commands.

Train agents

python train-agents.py

This command will run training on a few random predefined tracks. When agents are sufficiently trained, which will probably take quite a lot of time, you can stop the script.

Train generator and discriminator

python train-gan.py --agents=<path_to_dir_with_trained_agents>

Play with generator

With the trained generator you can evaluate whether the tracks it generates are fairer:

python evaluate.py --generator=<path_to_dir_with_generator> \
                   --agents=<path_to_dir_with_trained_agents>

You can also explore how the latent space looks like using the following command (this script requires the pyforms==3.0.0 to be installed):

python explore.py --generator=<path_to_dir_with_generator>

Or run latent interpolation:

python latent-interpolation.py --generator=<path_to_dir_with_generator>