This repository contains a Gym environment based on Castlevania: The Adventure for Game Boy, using the PyBoy emulator. Its goal is to provide a platform for training artificial intelligence agents in a classic video game environment.
pip install -r requirements.txtTo install the required PyBoy version with the specific game wrapper, clone and install from the following branch:
git clone --branch CastlevaniaTheAdventure-Wrapper https://github.com/BackrndSource/PyBoy.git
cd PyBoy
pip install .The Castlevania environment (CastlevaniaPyBoyEnv) extends a custom class, PyBoyEnv. This class can be reused for other games within the PyBoy emulator and is located in environments/PyBoyEnv.py.
To train an agent, run:
python train.pyTo test a trained agent, run:
python enjoy.pyA UI is also included to analyze memory using PyBoy's memscan. To use it, run:
python run.pyYou need to add the game ROM named Castlevania - The Adventure (Europe).gb in the root directory of the project.
Trained model checkpoints can be found in the models directory.
tensorboard --logdir logs/castlevania_tensorlog