- Ubuntu
- Python 3
- Make virtual environment
python3 -m venv venv
- Activate virtual environment
. venv/bin/activate
- Install baselines dependencies
sudo apt-get update && sudo apt-get install cmake libopenmpi-dev python3-dev zlib1g-dev
- Install Tensorflow
- Choice A: For CPU (slower)
pip install tensorflow==1.14.0
- Choice B: For Nvidia Cuda GPU (faster)
pip install tensorflow-gpu==1.14.0
- Install baselines (Current baselines in pip is outdated)
pip install git+https://github.com/openai/baselines.git
- Install Other dependencies
pip install -r requirements.txt
- Import sonic roms
python -m retro.import ./Roms
- Install retro-contest
git clone --recursive https://github.com/openai/retro-contest.git
pip install -e "retro-contest/support[docker,rest]"
python train.py
Monitoring is done through tensorboard. To run TensorBoard run the command below, make sure venv is activated
tensorboard --logdir ./tb_log
This will run tensorboard, and tensorboard will search for Events from the specified directory
Replace saved_model_filename with actual name of the saved model zip file. E.g. sonic_stable_dqn.zip
python play.py saved_model_filename
python slow_play.py saved_model_filename
Models that has successfully completed a level are stored inside saved_models