Important
This repository contains code for the paper:
Dergachev S., Yakovlev K. Decentralized Unlabeled Multi-agent Pathfinding via Target and Priority Swapping. Proceedings of the 27th European Conference on Artificial Intelligence (ECAI 2024). IOS Press, 2024, pp. 4344–4351.
This repository contains the source code for algorithms designed for decentralized anonymous/unlabeled multi-agent pathfinding (AMAPF), as described in the referenced paper. The focus of this project is on decentralized approaches, and it includes several baseline algorithms as well as the proposed TP-SWAP method. A more detailed description of these algorithms can be found in the paper.
The following baseline policies and AMAPF algorithms are implemented:
random: A baseline policy where agents move randomly without a specific strategy.smart_random: An improvedrandompolicy where agents agents move randomly, but avoid collisions with obstacles.shortest_path: Agents follow the shortest path to their closest targets using precomputed paths.base_tswaporD-TSWAP-C: A semi-decentralized solver based on TSWAP with consistent initial assignment and decentralized operation.naive_dec_tswaporD-TSWAP-N: A naive fully decentralized solver based on TSWAP.dec_tswaporTP-SWAP: The proposed fully decentralized solver.
This repository can also be used as a base framework for implementing custom AMAPF algorithms.
The repository is organized into several branches:
mainbranch [Link]: Contains the core implementation of the AMAPF algorithms, including all supported methods.experimentsbranch [Link]: Includes scripts and resources for running full-scale experiments, as described in the referenced paper. This branch provides tools for task generation, experiment execution, and result analysis.supplementarybranch [Link]: Contains extended experimental results analysis. This branch stands as supplementary material for the paper.
To use the repository, install the following software and libraries:
Python 3.11setuptoolsnumpymanavlib (v1.0)
The manavlib library provides utility functions for multi-agent navigation experiments, including tools for handling XML configuration files, generating tasks, and creating maps.
Installation: You can find detailed installation instructions in the manavlib GitHub repository. In brief, to install manavlib directly from its [GitHub] source (on Linux or macOS), use the following command:
git clone git@github.com:haiot4105/multi-agent-nav-lib.git
cd multi-agent-nav-lib
pip install -e .After all requirements was installed, you should clone this repo in separate folder and run installation process (tested on Linux and macOS):
To set up this repository, follow these steps (tested on Linux and macOS):
- Clone the repository:
git clone git@github.com:PathPlanning/TP-SWAP.git tp-swap- Install the package:
cd tp-swap
pip install -e .To run and evaluate the algorithms, clone this reporitory into separate folder second time and switch to the experiments branch, which includes all necessary scripts and tools for conducting experiments.
cd ..
git clone git@github.com:PathPlanning/TP-SWAP.git tp-swap-exp
cd tp-swap-exp
git checkout experimentsDetailed instructions for running experiments, generating tasks, and processing results can be found in the README of the experiments branch.
You can extend this repository by implementing a custom AMAPF algorithm. Here’s a brief guide:
- Create a New Agent Class:
Implement your algorithm by creating a new agent class (e.g.,
MyAlgAgent). Inherit from theAgentbase class (dec_tswap/agent.py) and override its methods. For examples, refer toRandomAgentandSmartRandomAgentindec_tswap/example_agent.py. - Create a Parameter Class:
Define a corresponding parameter class (e.g.,
MyAlgParams) that inherits fromBaseAlgParamsinmanavlib. This class should specify the necessary parameters for your algorithm. Refer to thedec_tswap/example_agent.pyfor examples.
Use the instructions from experiments branch to evaluate your algorithm.
If you use this repository in your research, please cite the following paper:
@inproceedings{dergachev2024decentralized,
title={Decentralized Unlabeled Multi-agent Pathfinding via Target and Priority Swapping},
author={Dergachev, S. and Yakovlev, K.},
booktitle={Proceedings of the 27th European Conference on Artificial Intelligence (ECAI 2024)},
year={2024},
pages={4344--4351},
publisher={IOS Press}
}For questions or further information, please contact:
- Stepan Dergachev (dergachev@isa.ru or sadergachev@hse.ru)
