Giter Site home page Giter Site logo

purvapruthi / toybox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from toybox-rs/toybox

0.0 0.0 0.0 7.79 MB

The Machine Learning Toybox for testing the behavior of autonomous agents.

Home Page: http://toybox.rs

Python 58.91% Shell 0.73% Dockerfile 0.05% HTML 40.31%

toybox's Introduction

The Reinforcement Learning Toybox CI

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).

How accurate are your games?

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.

Where is the actual Rust code?

The rust implementations of the games have moved to a different repository: toybox-rs/toybox-rs

Play the games (using pygame)

pip install ctoybox pygame
python -m ctoybox.human_play breakout
python -m ctoybox.human_play amidar
python -m ctoybox.human_play space_invaders

Run the tests

  1. 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 be python3 -m venv .env
    • If you are not sure of your version, run python --version
  2. Activate your virtual environment: source .env/bin/activate
  3. Run pip install -r REQUIREMENTS.txt
  4. Install baselines: cd baselines && python setup.py isntall && cd ..
  5. Run python setup.py install
  6. 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.

Python

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

Get starting images for reference from ALE / atari_py

./scripts/utils/start_images --help

toybox's People

Contributors

etosch avatar jjfiv avatar kclary avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.