AmineAndam04/cleanmarl

Single file implementations of Deep Multi-agent Reinforcement Learning

Python

77

117 commits

updated Sep 1, 2026

See the code

README

CleanMARL

CleanMARL provides single-file, clean, and educational implementations of Deep Multi-Agent Reinforcement Learning (MARL) algorithms in PyTorch, following the same philosophy of CleanRL.

Main Features

  • Implementations of key MARL algorithms: VDN, QMIX, COMA, MADDPG, FACMAC, IPPO, and MAPPO.

  • A documentation for algorithms, code and training details.

  • We support continuous and discrete actions.

  • We support parallel environments and recurrent policies.

  • Tensorboard and Weights & Biases logging.

We provide more details in our documentation.

Check the old_jax branch for JAX implementations (non-jax envs only).

Quick Start

Prerequisites:

  • Python >=3.9

Installation:

git clone https://github.com/AmineAndam04/cleanmarl.git
cd cleanmarl
pip install .

To run experiment you can run for example:

python  cleanmarl/vdn.py --env_type="pz" --env_name="simple_spread_v3" --env_family="mpe" --use_wnb --wnb_project="cleanmarl-test" --wnb_entity="cleanmarl-test" --total_timesteps=1000000

python  cleanmarl/mappo.py --env_type="smaclite" --env_name="3m" 

Supported Algorithms

Supported environments

We use marlbench to interact with MARL environments. marlbench is a tool that provides (1) a common API for MARL envs, (2) vectorized envs, and (2) common wrappers (normalization, clipping ...)

Install using uv pip install marlbench

EnvironmentAction spaceInstallation
Level-Based ForagingDiscretepip install lbforaging
Multi-Robot WarehouseDiscretepip install rware
SMACliteDiscreteInstall it from its GitHub repository
PettingZooDiscrete or continuouspip install pettingzoo and install the extra dependencies for the family you use
MaMuJoCoContinuouspip install gymnasium-robotics
MAgent2Discretepip install magent2
SMACDiscreteFollow the instructions in the SMAC repository
SMACv2DiscreteFollow the instructions in the SMACv2 repository
multiagent-reinforcement-learning
reinforcement-learning

AmineAndam04/cleanmarl

Single file implementations of Deep Multi-agent Reinforcement Learning

Python

77

117 commits

updated Sep 1, 2026

See the code

README

CleanMARL

CleanMARL provides single-file, clean, and educational implementations of Deep Multi-Agent Reinforcement Learning (MARL) algorithms in PyTorch, following the same philosophy of CleanRL.

Main Features

  • Implementations of key MARL algorithms: VDN, QMIX, COMA, MADDPG, FACMAC, IPPO, and MAPPO.

  • A documentation for algorithms, code and training details.

  • We support continuous and discrete actions.

  • We support parallel environments and recurrent policies.

  • Tensorboard and Weights & Biases logging.

We provide more details in our documentation.

Check the old_jax branch for JAX implementations (non-jax envs only).

Quick Start

Prerequisites:

  • Python >=3.9

Installation:

git clone https://github.com/AmineAndam04/cleanmarl.git
cd cleanmarl
pip install .

To run experiment you can run for example:

python  cleanmarl/vdn.py --env_type="pz" --env_name="simple_spread_v3" --env_family="mpe" --use_wnb --wnb_project="cleanmarl-test" --wnb_entity="cleanmarl-test" --total_timesteps=1000000

python  cleanmarl/mappo.py --env_type="smaclite" --env_name="3m" 

Supported Algorithms

Supported environments

We use marlbench to interact with MARL environments. marlbench is a tool that provides (1) a common API for MARL envs, (2) vectorized envs, and (2) common wrappers (normalization, clipping ...)

Install using uv pip install marlbench

EnvironmentAction spaceInstallation
Level-Based ForagingDiscretepip install lbforaging
Multi-Robot WarehouseDiscretepip install rware
SMACliteDiscreteInstall it from its GitHub repository
PettingZooDiscrete or continuouspip install pettingzoo and install the extra dependencies for the family you use
MaMuJoCoContinuouspip install gymnasium-robotics
MAgent2Discretepip install magent2
SMACDiscreteFollow the instructions in the SMAC repository
SMACv2DiscreteFollow the instructions in the SMACv2 repository
multiagent-reinforcement-learning
reinforcement-learning