No description
Find a file
Andy Li 8b23b43074
Some checks failed
test_macos / build (push) Has been cancelled
test_ubuntu / build (push) Has been cancelled
improve exp script
2026-06-22 15:47:44 +10:00
.github/workflows Create test_macos.yml 2021-06-10 23:36:42 -07:00
bench_mark add ignore 2026-06-18 21:26:29 +10:00
exp improve exp script 2026-06-22 15:47:44 +10:00
inc bug fix 2026-06-20 20:48:17 +10:00
src fix seed, fix human h bug 2026-06-22 09:44:17 +10:00
vis add vis 2026-06-18 21:28:31 +10:00
.DS_Store fix seed, fix human h bug 2026-06-22 09:44:17 +10:00
.gitattributes Initial commit 2020-09-11 17:02:21 +10:00
.gitignore fix seed, fix human h bug 2026-06-22 10:22:14 +10:00
asan.cmake bug fixes 2024-11-18 13:42:34 +11:00
CMakeLists.txt bug fix 2026-06-20 20:48:17 +10:00
license.txt Create license.txt 2021-02-04 16:08:38 -08:00
README.md Update README.md 2024-05-09 18:58:37 -04:00
ubsan.cmake bug fixes 2024-11-18 13:42:34 +11:00

MAPF-LNS

test_ubuntu test_macos

Anytime Multi-Agent Path Finding via Large Neighborhood Search

MAPF-LNS is an effifent anytime algorithm for solving Multi-Agent Path Finding (MAPF). More details can be found in our paper at IJCAI 2021 [1].

Note: The code used in the IJCAI paper had a typo for the agent-based neighborhood selection method. After fixing this typo (commit 3e03f6e), the method performs better than what was reported in the paper.

A stronger version MAPF-LNS2 can be found here: https://github.com/Jiaoyang-Li/MAPF-LNS2

The code requires the external libraries BOOST (https://www.boost.org/) and Eigen (https://eigen.tuxfamily.org/). An easy way to install the required libraries on Ubuntu:

sudo apt update
  • Install the Eigen library (used for linear algebra computing)
    sudo apt install libeigen3-dev
    
  • Install the boost library
    sudo apt install libboost-all-dev
    

After you installed both libraries and downloaded the source code, go into the directory of the source code and compile it with CMake:

cmake -DCMAKE_BUILD_TYPE=RELEASE .
make

You also need to download the MAPF instances from the MAPF benchmark (https://movingai.com/benchmarks/mapf/index.html). In particular, the format of the scen files is explained here: https://movingai.com/benchmarks/formats.html. For a given number of agents k, the first k rows of the scen file are used to generate the k pairs of start and target locations.

Then, you are able to run the code:

./lns -m random-32-32-20.map -a random-32-32-20-random-1.scen -o test.csv -k 50 -t 60
  • m: the map file from the MAPF benchmark
  • a: the scenario file from the MAPF benchmark
  • o: the output file
  • k: the number of agents
  • t: the runtime limit

You can find more details and explanations for all parameters with:

./lns --help

Credits

The software was developed by Jiaoyang Li and Zhe Chen.

The rule-based MAPF solvers (i.e., PPS, PIBT, and winPIBT) inside the software were borrowed from https://github.com/Kei18/pibt/tree/v1.3

MAPF-LNS is released under USC Research License. See license.txt for further details.

References

[1] Jiaoyang Li, Zhe Chen, Daniel Harabor, Peter J. Stuckey, Sven Koenig. Anytime Multi-Agent Path Finding via Large Neighborhood Search. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pages 4127-4135, 2021.