This repository provides the implementation of the "When to Switch" paper, offering various policies and algorithms designed to address the challenging problem of finding non-conflicting paths for a set of agents in an environment that is only partially observable to each agent (PO-MAPF). The repository includes two main policies: one is based on search-based re-planning (RePlan), and the other is based on reinforcement learning (EPOM). Additionally, the repository features three implementations of mixed policies, which switch between RePlan and EPOM.
Install all dependencies using:
pip install -r docker/requirements.txt
To download pretrained weights, use this link 137MB
Execute EPOM, RePlan, ASwitcher, LSwitcher, and HSwitcher to generate animations using pre-trained weights with the following command:
python example.py
The animations will be stored in the renders
folder.
To train EPOM, execute train_epom.py
with the learning/train.yaml
config file:
python train_epom.py --config_path="learning/train.yaml"
To train LSwitcher estimator for the RePlan or EPOM algorithm, use the commands below:
python train_lswitcher.py --algo="RePlan"
python train_lswitcher.py --algo="EPOM"
If you use this repository in your research or wish to reference it, please cite our TNNLS paper:
@article{skrynnik2023switch,
title = {When to Switch: Planning and Learning for Partially Observable Multi-Agent Pathfinding},
author = {Skrynnik, Alexey and Andreychuk, Anton and Yakovlev, Konstantin and Panov, Aleksandr I},
journal = {IEEE Transactions on Neural Networks and Learning Systems},
year = {2023},
publisher = {IEEE}
}