MRBTP: Efficient Multi-Robot Behavior Tree Planning and Collaboration

June 27, 2026 ยท View on GitHub

AAAI 2025 (Oral)

[Website] [arXiv] [PDF] [Demo & Tutorial]

Python Version GitHub license

๐Ÿ“ฐ News

  • [2026-06] ๐ŸŽ‰ MRBTP-demo is now online! A slim, well-documented tutorial version of MRBTP has been released at https://github.com/DIDS-EI/MRBTP-demo. It provides a minimal, runnable entry point for understanding the multi-robot behavior-tree planning algorithm and quickly adapting it to custom tasks.
  • [2025-02] ๐Ÿ“„ The arXiv preprint is available: https://arxiv.org/abs/2502.18072.
  • [2024-12] ๐Ÿ† MRBTP is accepted to AAAI 2025 as an Oral presentation (Top 4.6%).

MRBTP is a decentralized Multi-Robot Behavior-Tree Planning framework. Given a shared symbolic goal and per-agent action models, it back-chains runnable behavior trees for each agent so that, executed in parallel, the team collectively satisfies the goal. The repository ships:

  • four planning algorithms (MRBTP / MABTP / MAOBTP / CABTP),
  • a MiniGrid-based warehouse simulator for quick demos,
  • a VirtualHome bridge for household tasks,
  • an LLM client used to generate composite-action sub-trees.

๐Ÿ› ๏ธ Installation

1. Environment

conda create --name mabtpg python=3.10
conda activate mabtpg

2. Install MABTPG

cd MRBTP
pip install -e .

3. (Optional) VirtualHome executable

Only needed if you want to run the household-service scenario. Currently only Windows is fully tested.

OSDownload
Linuxlinux_exec.zip
macOSmacos_exec.zip
Windowswindows_exec.zip

4. MiniGrid / BabyAI

No extra binary download is required โ€” gymnasium and minigrid are pulled in automatically by pip install -e ..


๐Ÿš€ Quick Start

Minimal demo (MiniGrid)

python test_multi_minigrid_single_demo/main.py
4 robots

Demo with composite actions (LLM-style sub-trees)

test_multi_minigrid_single_demo/main2.py is a self-contained example that combines:

  • a custom MiniGrid-DoorKey-8x8-v0 layout,
  • 2 agents,
  • a CompositeActionPlanner that pre-builds reusable sub-trees (e.g. Move ball-1 to room-1 and place it next to ball-3),
  • the optimal planner MAOBTP,
  • live rendering of every tick.
python test_multi_minigrid_single_demo/main2.py

All artefacts (robot-i.bt, robot-i.svg, sub-tree diagrams) are written to test_multi_minigrid_single_demo/output/ so the workspace root stays clean.

Customising the environment

Subclass MiniGridToMAGridEnv (see mabtpg/envs/gridenv/minigrid/minigrid_env.py) or register a custom MiniGrid env via gymnasium.envs.registration.register (see the register(...) block in main2.py for a working example) to construct your own room layouts. Pre-built scenarios are listed in MiniGrid_all_scenarios.txt.


๐Ÿง  Planning Algorithms

The mabtpg/btp/ package exports four classes whose names match the paper one-to-one. See mabtpg/btp/README.md for the full cheat-sheet.

Paper termClassFileWhat it does
MRBTPMRBTPmulti_robot.pyTop-level facade that returns runnable per-agent BTs.
MR-BTP (baseline)MABTPmulti_robot_basic.pyPer-step FIFO back-chaining search.
Optimal MR-BTPMAOBTPmulti_robot_optimal.pyCost-priority heap search; supports composite actions.
Composite-action BTPCABTPcomposite_action.pySingle-agent planner that builds sub-tree macros.
# Recommended imports
from mabtpg.btp import MRBTP, MABTP, MAOBTP, CABTP
from mabtpg.btp import PlanningAgent, PlanningCondition

# Backward-compatible alias for the paper's historical class name
from mabtpg.btp import DMR     # DMR is MRBTP โ†’ True

๐Ÿ“‚ Directory Structure

mabtpg/
โ”‚
โ”œโ”€โ”€ agent/             โ€” Configuration for intelligent agents.
โ”œโ”€โ”€ llm_client/        โ€” Standalone LLM integration module
โ”‚   โ”œโ”€โ”€ base.py            BaseLLMClient (chat / tool-calling / embeddings)
โ”‚   โ”œโ”€โ”€ llms/              Concrete clients (LLMGPT3, LLMGPT4, LLMGPT4o)
โ”‚   โ””โ”€โ”€ schemas/           Pydantic schemas used as OpenAI tools
โ”œโ”€โ”€ btp/               โ€” Behavior-tree planning algorithms (see btp/README.md)
โ”‚   โ”œโ”€โ”€ base/                      PlanningAgent / PlanningCondition
โ”‚   โ”œโ”€โ”€ multi_robot_basic.py       MABTP   โ€” FIFO baseline
โ”‚   โ”œโ”€โ”€ multi_robot_optimal.py     MAOBTP  โ€” cost-priority heap; composites
โ”‚   โ”œโ”€โ”€ composite_action.py        CABTP   โ€” single-agent macro builder
โ”‚   โ””โ”€โ”€ multi_robot.py             MRBTP   โ€” paper-aligned facade
โ”‚                                            (exports DMR = MRBTP alias)
โ”œโ”€โ”€ behavior_tree/     โ€” Components of the behavior-tree engine
โ”œโ”€โ”€ envs/              โ€” Environments for agent interaction
โ”‚   โ”œโ”€โ”€ base/              Foundational elements
โ”‚   โ”œโ”€โ”€ gridenv/
โ”‚   โ”‚   โ””โ”€โ”€ minigrid/      Warehouse-management scenario
โ”‚   โ”œโ”€โ”€ virtualhome/
โ”‚   โ”‚   โ””โ”€โ”€ simulation/    VirtualHome Unity / evolving-graph simulators
โ”‚   โ””โ”€โ”€ numericenv/        Numerical simulation platform
โ””โ”€โ”€ utils/             โ€” Supporting functions and utilities

simulators/            โ€” Platforms for realistic training environments

test_multi_minigrid_single_demo/
                       โ€” Smallest end-to-end runnable demo (start here)

test_experiment/       โ€” Modules for testing BT planning, LLMs and scene
โ”‚                        interactions.
โ”œโ”€โ”€ exp1_robustness_parallelism/
โ”‚   โ”œโ”€โ”€ code/
โ”‚   โ””โ”€โ”€ results/
โ””โ”€โ”€ exp2_subtree_llms/
    โ”œโ”€โ”€ code/
    โ”‚   โ”œโ”€โ”€ data/
    โ”‚   โ””โ”€โ”€ llm_data/
    โ””โ”€โ”€ results/

๐Ÿงช Reproducing the Paper Experiments

FolderTopic
test_experiment/exp1_robustness_parallelism/code/Robustness + parallelism scaling experiments
test_experiment/exp2_subtree_llms/code/LLM-generated sub-tree macros for composite acts

Each experiment folder ships its own code/ (entry-point scripts) and results/ (CSV / SVG / BT artefacts) so runs are reproducible end-to- end.


๐Ÿ“‘ Citation

If you find this repository useful, please cite:

@inproceedings{mrbtp2025,
  title     = {MRBTP: Efficient Multi-Robot Behavior Tree Planning and Collaboration},
  author    = {Anonymous Authors},
  booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
  year      = {2025},
  note      = {Oral presentation. arXiv:2502.18072}
}

License

This project is licensed under the MIT License โ€” see the LICENSE file for details.