Yifeng Zhang1,
Jieming Chen2,
Tingguang Zhou1
Tanishq Duhan1,
Jianghong Dong3,*,
Yuhong Cao1,
Guillaume Sartoretti1
1National University of Singapore 2Hong Kong Polytechnic University 3Tsinghua University
Communications in Transportation Research (COMMTR) 2026
conda create -n coin python=3.9
conda activate coingit clone https://github.com/marmotlab/COIN
cd COINInstall MetaDrive (0.4.2.3) via:
git clone https://github.com/metadriverse/metadrive.git
cd metadrive
pip install -e .You can verify the installation of MetaDrive via running the testing script:
# Go to a folder where no sub-folder calls metadrive
python -m metadrive.examples.profile_metadriveNote that please do not run the above command in a folder that has a sub-folder called ./metadrive.
pip install -r requirements.txtNotes:
- GPU is recommended for training, but the code can fall back to CPU.
- If you already have a working MetaDrive installation, check version compatibility before mixing environments.
Train COIN with the main script:
python td3_main.py --env_name intersection --seed 1000--env_name supports three scenarios:
intersectionroundaboutbottleneck
Note: For all reported experiments, we train the model with 8 different random seeds: 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000.
Training outputs are saved under a timestamped directory in runs/, including:
model/for checkpoints,train/for TensorBoard logs,result/for metrics,gifs/for rendered rollouts.
To monitor training:
tensorboard --logdir runsEvaluate a trained model with:
python td3_eval.py --env_name intersection --model_path runs/<your_run_dir> --num_eval 20 --gui TrueWhat the evaluation script does:
- loads the best checkpoint from
--model_path, - evaluates multiple traffic densities (e.g., initial agents counts),
- saves summary JSON files into
result/, - exports top-down GIFs into
gifs/.
If you are running on a headless server, set:
python td3_eval.py --env_name bottleneck --model_path runs/<your_run_dir> --gui FalseFor training and evaluating baseline methods, please refer to the CoPO codebase and its configuration setup:
For detailed qualitative examples and additional demos, please refer to the Project Website.
COIN is greatly inspired by the following outstanding contributions to the open-source community: MetaDrive, CoPO.
If you find this repository useful, please cite the paper:
@article{zhang2026coin,
title = {COIN: Collaborative Interaction-Aware Multi-Agent Reinforcement Learning for Self-Driving Systems},
author = {Zhang, Yifeng and Chen, Jieming and Zhou, Tingguang and Duhan, Tanishq and Dong, Jianghong and Cao, Yuhong and Sartoretti, Guillaume},
journal = {arXiv preprint arXiv:2603.24931},
year = {2026}
}Please follow the licenses of this repository and all upstream dependencies, especially MetaDrive and any assets or external components included in the project tree.

