QMario is a personal project to train an AI agent playing the SuperMarioBros. The environment is created by OpenAI gym. The specification of the environment can be found here. The framework of this project is Pytorch Lightning.
The neural network is just a simple double deep q network. The replay buffer is a multistep replay buffer.
You can install all the dependencies by using qmario.yml
with conda
.
Use train.py
to start training.
Use test.py
to test the trained model. You need to edit the checkpoint path in test.py by yourself.
Hint: You can add save_video=True
when constructing the model to save videos. Don't forget to specify the value of fps
. Due to the limitation of MoviePy, you need to create the folder first if you want to put the videos in a folder.