This is our project for Reinforcement Learning with PyBoy, where we trained agents to play GameBoy games, namely Super Mario Land and Kirby's Dream Land.
Report: report
Training time:
- Super Mario Land: 26 hours on a 4-core CPU
- Kirby's Dream Land: 20 hours on CUDA GPU
- Kirby's Dream Land Bossfight: 12 hours on CUDA GPU
- Python3.7 on Windows
- Python3+ on Linux
- PyBoy (https://github.com/Baekalfen/PyBoy)
- SDL2
- Ubuntu:
sudo apt install libsdl2-dev
- Fedora:
sudo dnf install SDL2-devel
- macOS:
brew install sdl2
- Windows: PyBoy guide https://github.com/Baekalfen/PyBoy/wiki/Installation#windows-10-64-bit Download link https://www.libsdl.org/download-2.0.php
- Ubuntu:
- For package requirements see requirements.txt
- GameBoy ROM files for Super Mario Land or Kirby's Dream Land (place these in /games)
- Filename must be "Kirby_Dream_Land" and "Super_Mario_Land" respectively
To run from source, first install dependencies:
pip3 install -r requirements.txt
Then, run:
python3 main.py
Build command: docker build --tag pyboy-rl .
Once inside the image run python3 main.py
to start the program. The docker container only supports headless mode, and the game emulator ui will not show up.
DDQN - https://arxiv.org/abs/1509.06461
PyTorch RL Super Mario Bros Example - https://pytorch.org/tutorials/intermediate/mario_rl_tutorial.html