JacobPfau / procgenAISC

MIT License
18 stars 16 forks source link

Goal Misgeneralization in Procgen

This is a fork of the procgen benchmark that implements modifications for the paper Goal Misgeneralization in Deep Reinforcement Learning.

Descriptions of the modified environments

For both 'Keys and Chests' environments we added two options:

For more information on the standard environments see the original repository.

Installation

Below we reproduce the instructions to install from source, copied from the original repo.


First make sure you have a supported version of python:

# run these commands to check for the correct python version
python -c "import sys; assert (3,6,0) <= sys.version_info <= (3,9,0), 'python is incorrect version'; print('ok')"
python -c "import platform; assert platform.architecture()[0] == '64bit', 'python is not 64-bit'; print('ok')"

If you want to change the environments or create new ones, you should build from source. You can get miniconda from https://docs.conda.io/en/latest/miniconda.html if you don't have it, or install the dependencies from environment.yml manually. On Windows you will also need "Visual Studio 15 2017" installed.

git clone git@github.com:openai/procgen.git
cd procgen
conda env update --name procgen --file environment.yml
conda activate procgen
pip install -e .
# this should say "building procgen...done"
python -c "from procgen import ProcgenGym3Env; ProcgenGym3Env(num=1, env_name='coinrun')"
# this should create a window where you can play the coinrun environment
python -m procgen.interactive

The environment code is in C++ and is compiled into a shared library exposing the gym3.libenv C interface that is then loaded by python. The C++ code uses Qt for drawing.