JaxMARL: Multi-Agent RL Environments in JAX

Abstract

Benchmarks play an important role in the development of machine learning algorithms. Reinforcement learning environments are traditionally run on the CPU, limiting their scalability with typical academic compute. However, recent advancements in JAX have enabled the wider use of hardware acceleration to overcome these computational hurdles by producing massively parallel RL training pipelines and environments. This is particularly useful for multi-agent reinforcement learning (MARL) research where not only multiple agents must be considered at each environment step, adding additional computational burden, but also the sample complexity is increased due to non-stationarity, decentralised partial observability, or other MARL challenges. In this paper, we present JaxMARL, the first open-source code base that combines ease-of-use with GPU enabled efficiency, and supports a large number of commonly used MARL environments as well as popular baseline algorithms. Our experiments show that our JAX-based implementations are up to 1400x faster than existing single-threaded baselines. This enables efficient and thorough evaluations, with the potential to alleviate the *evaluation crisis* of the field. We also introduce and benchmark SMAX, a vectorised, simplified version of the StarCraft Multi-Agent Challenge, which removes the need to run the StarCraft II game engine. This not only enables GPU acceleration, but also provides a more flexible MARL environment, unlocking the potential for self-play, meta-learning, and other future applications in MARL.

Cite

Text

Rutherford et al. "JaxMARL: Multi-Agent RL Environments in JAX." NeurIPS 2023 Workshops: ALOE, 2023.

Markdown

[Rutherford et al. "JaxMARL: Multi-Agent RL Environments in JAX." NeurIPS 2023 Workshops: ALOE, 2023.](https://mlanthology.org/neuripsw/2023/rutherford2023neuripsw-jaxmarl/)

BibTeX

@inproceedings{rutherford2023neuripsw-jaxmarl,
  title     = {{JaxMARL: Multi-Agent RL Environments in JAX}},
  author    = {Rutherford, Alexander and Ellis, Benjamin and Gallici, Matteo and Cook, Jonathan and Lupu, Andrei and Ingvarsson, Garðar and Willi, Timon and Khan, Akbir and de Witt, Christian Schroeder and Souly, Alexandra and Bandyopadhyay, Saptarashmi and Samvelyan, Mikayel and Jiang, Minqi and Lange, Robert Tjarko and Whiteson, Shimon and Lacerda, Bruno and Hawes, Nick and Rocktäschel, Tim and Lu, Chris and Foerster, Jakob Nicolaus},
  booktitle = {NeurIPS 2023 Workshops: ALOE},
  year      = {2023},
  url       = {https://mlanthology.org/neuripsw/2023/rutherford2023neuripsw-jaxmarl/}
}