This project uses the mario implementation defined on the repository: https://github.com/Mawiszus/TOAD-GUI the project uses the code made by Maren Awiszus, Frederik Schubert and Bodo Rosenhahn which is explained on the paper referenced here: https://ieeexplore.ieee.org/abstract/document/9390320/footnotes#footnotes
@inproceedings{awiszus2020toadgan,
title={TOAD-GAN: Coherent Style Level Generation from a Single Example},
author={Awiszus, Maren and Schubert, Frederik and Rosenhahn, Bodo},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment},
year={2020}
}
This project uses the Mario-AI-Framework by Ahmed Khalifa and includes graphics from the game Super Mario Bros. It is not affiliated with or endorsed by Nintendo. The project was built for research purposes only.
This section includes the necessary steps to get TOAD-GUI running on your system.
You will need Python 3 and the packages specified in requirements.txt. We recommend setting up a virtual environment with pip and installing the packages there.
$ pip3 install -r requirements.txt -f "https://download.pytorch.org/whl/torch_stable.html"
Make sure you use the pip3
that belongs to your previously defined virtual environment.
The GUI is made with Tkinter, which from Python 3.7 onwards is installed by default. If you don't have it installed because of an older version, follow the instructions here.
TOAD-GUI uses the Mario-AI-Framework to play the g 6A37 enerated levels. For the Framework to run, Java 11 (or higher) needs to be installed.
Once all prerequisites are installed, the project can be started by running main.py.
$ python main.py
Make sure you are using the python installation you installed the prerequisites into.
If you are interested in training your own Generator, refer to the TOAD-GAN Github and copy the folder of your trained generator into the generators/
folder.
You should now be able to open it just like the provided generators.
The necessary files are:
generators.pth
noise_amplitudes.pth
noise_maps.pth
num_layer.pth
reals.pth
token_list.pth
Any other files can be deleted if you want to keep your folders tidy.
NOTE: When a generator is opened, it will not show these files in the dialog window.
That is intended behavior for askdirectory()
of tkinter. Just navigate to the correct path and click "Open" regardless.
-
If the level play is quit using the window ('x' button in the corner), an error message regarding py4j will occur. In spite of that, the program should continue running normally.
-
If you have two monitors with different resolutions, the GUI and the Java window might not be displayed in the correct resolution. Try moving the windows to the monitor with the other resolution if you encounter this problem. You can also change the DPI awareness for the program in the beginning of GUI.py.
- [Francisco José Vargas Castro] - Universidad de Sevilla
This program is not endorsed by Nintendo and is only intended for research purposes. Mario is a Nintendo character which the authors don’t own any rights to. Nintendo is also the sole owner of all the graphical assets in the game.