Visit toybox-rs/Toybox for the continuously-maintaned version.
A set of games designed for testing deep RL agents.
If you use this code, or otherwise are inspired by our white-box testing approach, please cite our NeurIPS workshop paper:
@inproceedings{foley2018toybox,
title={{Toybox: Better Atari Environments for Testing Reinforcement Learning Agents}},
author={Foley, John and Tosch, Emma and Clary, Kaleigh and Jensen, David},
booktitle={{NeurIPS 2018 Workshop on Systems for ML}},
year={2018}
}
We have a lenghtier paper on ArXiV and can provide a draft of a non-public paper on our acceptance testing framework by request (email at etosch at cs dot umass dot edu).
Watch four minutes of agents playing each game. Both ALE implementations and Toybox implementations have their idiosyncracies, but the core gameplay and concepts have been captured. Pull requests always welcome to improve fidelity.
The rust implementations of the games have moved to a different repository: toybox-rs/toybox-rs
pip install ctoybox
pip install git+https://github.com/toybox-rs/Toybox
pip install ctoybox pygame
python -m ctoybox.human_play breakout
python -m ctoybox.human_play amidar
python -m ctoybox.human_play space_invaders
- Create a virtual environment using your python3 installation:
${python} -m venv .env
- If you are on OSX, this is likely
python3
: thus, your command will bepython3 -m venv .env
- If you are not sure of your version, run
python --version
- If you are on OSX, this is likely
- Activate your virtual environment:
source .env/bin/activate
- Run
pip install -r REQUIREMENTS.txt
- Install baselines:
cd baselines && python setup.py isntall && cd ..
- Run
python setup.py install
- Run
python -m unittest toybox.sample_tests.test_${GAME}.${TEST_NAME}
We have observed installation issues on OSX Catalina; if you get a linker error for ujson library, you can try running with the CFLAGS argument:
CFLAGS=-stdlib=libc++ pip install ujson
If this does not work, the code will simply default back to the existing json library.
Tensorflow, OpenAI Gym, OpenCV, and other libraries may or may not break with various Python versions. We have confirmed that the code in this repository will work with the following Python versions:
- 3.5
./scripts/utils/start_images --help