Skip to content

bsarkar321/madrona_rl_envs

 
 

Repository files navigation

Madrona RL Environments

Open In Colab

Implementation of various RL Environments using the Madrona game engine. You can also train an Overcooked agent in 2 minutes using the Google Colab link above. You can also read our post about the process of porting Overcooked to Madrona.

Environments

This repo contains implementations of various RL environments. Please read the respective README files to test the installation.

  • Balance Beam, a very simple 2-player cooperative game. This is a good starting point if you want to understand how to implement a simple environment in Madrona.
  • Cartpole, the classic single-player RL environment.
  • Hanabi, a standard environment for cooperative multi-agent RL with partial observability.
  • Overcooked, a 2D grid-based environment for cooperative multi-agent RL based on the Overcooked game.
  • Overcooked (JS-compatible), an older implementation of Overcooked that is compatible with a javascript interface. This is the version used in the Colab notebook.

Requirements

To use Madrona with GPU, you need a CUDA version of at least 12.0 and a cmake version of at least 3.18. For these environments, you also need to have conda environments (miniconda/anaconda).

To install miniconda (from miniconda3 instructions):

mkdir miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm miniconda3/miniconda.sh
miniconda3/bin/conda init bash
# restart shell afterwards

Installation

conda create -n madrona python=3.10
conda activate madrona
pip install torch numpy tensorboard

git clone https://github.com/bsarkar321/madrona_rl_envs
cd madrona_rl_envs
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make -j
cd ..

pip install -e .

pip install -e overcooked_ai
pip install -e oldercooked_ai

NOTE: For cmake, you may need to specify the cuda tookit directory as follows:

cmake -D CUDAToolkit_ROOT=/usr/local/cuda-12.0 ..

About

Collection of RL Environments built using Madrona

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 81.5%
  • C++ 16.1%
  • Jupyter Notebook 1.7%
  • Other 0.7%