Research on how to both identify optimization targets in model agents, and how to robustly influence agent behavior based on modifying those targets.
- Python 3.9 (specific version required)
- Qt5 (for macOS users)
- Git
# Install uv if you haven't already
pip install uv
# Create virtual environment with Python 3.9
uv venv --python=3.9
# Activate the environment
source .venv/bin/activate
# Install dependencies
uv pip install -r requirements.txt
# Install procgen from source (required)
git clone https://github.com/openai/procgen.git
cd procgen
git checkout 1d6dcd9f8ac5544c0f99d3b82c3a5ecb27e481f6 # version 0.10.7
python -m pip install -e .
# Install procgen-tools
python -m pip install git+https://github.com/UlisseMini/procgen-tools.git
Note when testing: it is critical to use gym and not gymnasium when running procgen.
Also, ensure that Qt5 is installed when building procgen from source
# Install poetry if you haven't already
pip install poetry
# Configure poetry to use Python 3.9
poetry env use python3.9
# Install dependencies
poetry install
# Enter poetry shell
poetry shell
# Install procgen from source (required)
git clone https://github.com/openai/procgen.git
cd procgen
git checkout 1d6dcd9f8ac5544c0f99d3b82c3a5ecb27e481f6 # version 0.10.7
python -m pip install -e .
# Install procgen-tools
python -m pip install git+https://github.com/UlisseMini/procgen-tools.git
# Create virtual environment with Python 3.9
python3.9 -m venv .venv
# Activate virtual environment
source .venv/bin/activate
# Upgrade pip
python -m pip install --upgrade pip
# Install dependencies
python -m pip install -r requirements.txt
# Install procgen from source (required)
git clone https://github.com/openai/procgen.git
cd procgen
git checkout 1d6dcd9f8ac5544c0f99d3b82c3a5ecb27e481f6 # version 0.10.7
python -m pip install -e .
# Install procgen-tools
python -m pip install git+https://github.com/UlisseMini/procgen-tools.git
macOS users need to install Qt5 before building procgen:
# Install Qt5
brew install qt@5
# Add Qt to your PATH (add this to your ~/.zshrc or ~/.bashrc)
export PATH="/usr/local/opt/qt@5/bin:$PATH"
If you encounter build errors with procgen, modify CMakeLists.txt
in the procgen source:
# Find this line:
# add_compile_options(-Wextra -Wshadow -Wall -Wformat=2 -Wundef -Wvla -Wmissing-include-dirs -Wnon-virtual-dtor -Werror)
# Replace it with:
add_compile_options(-Wextra -Wshadow -Wall -Wformat=2 -Wundef -Wvla -Wmissing-include-dirs -Wnon-virtual-dtor -Wno-unused-parameter -Wno-unused-variable)
- Always use
python -m pip
instead of justpip
when not using uv or poetry - Verify your environment is correct:
which python
python --version # should show Python 3.9.x
- Use a fresh virtual environment if you encounter persistent issues
- Make sure procgen is installed before procgen-tools
- Verify you're using Python 3.9
After installation, verify everything works:
python
>>> import procgen_tools
>>> import procgen
.
├── requirements.txt # Core dependencies
├── pyproject.toml # Poetry configuration
├── .python-version # Python version file
└── .gitignore # Includes virtual environments and build artifacts