GT-STAR-Lab / MARBLER

Multi-Robot RL Benchmark and Learning Environment for the Robotarium | IEEE MRS 2023
https://shubhlohiya.github.io/MARBLER/
MIT License
9 stars 3 forks source link
multi-agent-reinforcement-learning reinforcement-learning robotarium

MARBLER: Multi-Agent RL Benchmark and Learning Environment for the Robotarium

Team: Reza Torbati, Shubham Lohiya, Shivika Singh, Meher Nigam

Installation Instructions

  1. Create new Conda Environment: conda create -n MARBLER python=3.8 && conda activate MARBLER.
    • Note that python 3.8 is only chosen to ensure compatitbility with EPyMARL.
  2. Download and Install the Robotarium Python Simulator
    • As of now, the most recent commit our code works with is 6bb184e. The code will run with the most recent push to the Robotarium but it will crash during training.
  3. Install our environment by running pip install -e . in this directory
  4. To test successfull installation, run python3 -m robotarium_gym.main to run a pretrained model

Usage

Training with EPyMARL

  1. Download and Install EPyMARL. On Ubuntu 22.04, to successfully install EPyMARL, I have to:
    • Change line 15 in requirements.txt from protobuf==3.6.1 to protobuf
    • Downgrade wheel to 0.38.4
    • Downgrade setuptools to 65.5.0
    • Install einops and torchscatter
  2. Train agents normally using our gym keys
    • For example: python3 src/main.py --config=qmix --env-config=gymma with env_args.time_limit=1000 env_args.key="robotarium_gym:PredatorCapturePrey-v0"
    • To train faster, ensure robotarium is False, real_time is False, and show_figure_frequency is large or -1 in the environment's config.yaml
    • Known error: if env_args.time_limit<max_episode_steps, EPyMARL will crash after the first episode
  3. Copy the trained weights to the models folder for the scenario that was trained
    • Requires the agent.th file (location should be printed in the cout of the terminal the model was trained in, typically in EPyMARL/results/models/...)
    • Requires the config.json file (typically in EPyMARL/results/algorithm_name/gym:scenario/...)
  4. Update the scenario's config.yaml to use the newly trained agents

Citing

If you use this in your work please cite: