schrum2 / MM-NEAT

Modular Multiobjective (Hyper) Neuro-Evolution of Augmenting Topologies + MAP-Elites: Java code for evolving intelligent agents in Ms. Pac-Man, Tetris, and more, as well as code for Procedural Content Generation in Mario, Zelda, Minecraft, and more!
http://people.southwestern.edu/~schrum2/re/mm-neat.php
Other
50 stars 20 forks source link

One Mario GAN for all levels #648

Closed schrum2 closed 3 years ago

schrum2 commented 3 years ago

Look in src\main\python\GAN\MarioGAN. This is where the Mario GANs are stored. json training sets for Mario are in src\main\python\GAN along with the main.py script for training a GAN. See LodeRunnerModels.bat for example commands on how models for Lode Runner were trained.

If you look at the Mario GANs and the training sets, you'll see that they are split into overworld levels and underground levels. Vanessa Volz trained these GANs and indicated that there were problems if you combined the levels. She also excluded levels of a type she labelled "athletic". However, I would like to see what happens if we train a GAN on ALL of the levels in Mario. The VGLC data is in data\VGLC\SuperMarioBrosNewEncoding. Note that this is not the raw VGLC data, but is instead a modified encoding devised by Vanessa. It should be possible to make a new json training set based on all of the data from all of these levels.

I believe the code you need to make the json is in edu.southwestern.tasks.mario.level.LevelParser, but you should look at MarioLevelUtil and other classes in this package too.

The point of training a GAN on all of the levels is to see if it can produce both overworld and underworld type levels successfully ... and maybe athletic too. Whether this works or not, I have some interesting follow-up work we can do based on it.

MBatt1 commented 3 years ago

https://github.com/TheHedgeify/DagstuhlGAN/blob/master/marioaiDagstuhl/src/reader/MarioReader.java source for reader/writer

schrum2 commented 3 years ago

Original Mario levels: https://ian-albert.com/games/super_mario_bros_maps/

MBatt1 commented 3 years ago

Finished training, but output is extremely strange and possibly certain tiles were not number correctly

schrum2 commented 3 years ago

Because this Mario GAN model is weird, I think we need to do a sanity check. Go through the process you went through to make the ALL levels training set, and make your own versions of the training sets for the Overworld and Underground levels. Then train GANs on those levels, and make sure they produce levels that make sense ... they should be comparable to the other Overworld and Underground GAN models we already have.

schrum2 commented 3 years ago

Try making a json that has overworld and underground, but excludes athletic. Then do one with overworld and athletic, but no underground. Train GANs on these jsons to see if they are also weird

schrum2 commented 3 years ago

Although some other issues are more important, this remaining step seems easy enough that I would still like to make the alternate training set and new GAN before SCOPE ends.

MBatt1 commented 3 years ago

Currently training GAN with only overworld and underground

MBatt1 commented 3 years ago

"Successfully" trained a combined underground/overworld GAN, though there is an unusual amount of pipes

MBatt1 commented 3 years ago

I am trashing all of the old "All" GANs, however the jsons and batches to train them are still present. They all had similar issues with stripes/grids of stuff spread across the level: image image image image

schrum2 commented 3 years ago

Although we're closing this issue, the results here make me more interested in pursuing the Conditional GAN for Mario #538. Definitely curious to find out if that type of model could support the distinct level types, but it is also easy to just train separate GANs.