Git Product home page Git Product logo

pypibt's Introduction

pypibt

MIT License CI

A minimal python implementation of Priority Inheritance with Backtracking (PIBT) for Multi-Agent Path Finding (MAPF). If you are just interested in moving hundreds of agents or more in a short period of time, PIBT may work as a powerful tool.

  • Okumura, K., Machida, M., Défago, X., & Tamura, Y. Priority inheritance with backtracking for iterative multi-agent path finding. AIJ. 2022. [project-page]

background

To be honest, as the developer of PIBT, I only developed it to keep multiple agents running smoothly, not to solve MAPF or MAPD. But it turned out to be much more powerful than I expected. A successful example is LaCAM*. It achieves remarkable performance, to say the least. I also noticed that PIBT has been extended and used by other researchers. These experiences were enough to motivate me to create a minimal implementation example to help other studies, including my future research projects.

As you know, many researchers like Python because it is friendly and has a nice ecosystem. In contrast, most MAPF algorithms, such as the original PIBT, are coded in C++ for performance reasons. So here is the Python implementation. I hope the repo is helpful to understand the algorithm; the main part is only a hundred and a few lines. You can also use and extend this repo, for example, applying to new problems, enhancing with machine learning, etc.

setup

This repository is easily setup with Poetry. After cloning this repo, run the following to complete the setup.

poetry install

demo

poetry run python app.py -m assets/random-32-32-10.map -i assets/random-32-32-10-random-1.scen -N 200

The result will be saved in output.txt The grid maps and scenarios in assets/ are from MAPF benchmarks.

visualization

You can visualize the planning result with @kei18/mapf-visualizer.

mapf-visualizer ./assets/random-32-32-10.map ./output.txt

jupyter lab

Jupyter Lab is also available. Use the following command:

poetry run jupyter lab

You can see an example in notebooks/demo.ipynb.

Licence

This software is released under the MIT License, see LICENSE.txt.

pypibt's People

Contributors

kei18 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pypibt's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.