Skip to content

The official repo for ICRA 2023 paper 'Accelerating Multi-Agent Planning Using Graph Transformers with Bounded Suboptimality'

License

Notifications You must be signed in to change notification settings

rainorangelemon/GNN-Multi-Agent-Search

Repository files navigation

🗺 Accelerating Multi-Agent Planning Using Graph Transformers with Bounded Suboptimality (ICRA'2023)

paper | project page

In this repo, we provide the environments including:

Maze Environment 👇 Box Environment 👇

and the algorithms that we compare with

Installation

To install, run the following:

conda create -n venv_MASearch python=3.8
conda install numpy
# conda install pyg -c pyg -c conda-forge  # install torch geometric
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
conda install pyg -c pyg  # install torch geometric 2.0.4

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cu113.html

pip install seaborn
pip install wandb
pip install shapely
pip install torchsummary
pip install easydict

Quickstart

We provide an example to plan on Maze and Box with the CBS planner in the tutorial notebook. Using other planners can be easily done by replacing the CBSPlanner to other planners' classes.

Dataset Generation

To generate dataset:

python datasetgenerator/DatasetGenMultiAgent.py --env_name BoxEnv \
--min_max_num_agents 1 5
python datasetgenerator/DatasetGenMultiAgent.py --env_name MazeEnv \
--min_max_num_agents 10 20

To split the dataset after generating it from expert solution:

python datasetgenerator/DatasetGenMultiAgent.py --env_name BoxEnv --split_dataset True\
--min_max_num_agents 1 5   
python datasetgenerator/DatasetGenMultiAgent.py --env_name MazeEnv --split_dataset True\
--min_max_num_agents 10 20

Dataset Post-processing by dataloader

To post-process dataset:

python dataloader/BatchDataloader.py  --env_name BoxEnv --min_max_num_agents 1 5

python dataloader/BatchDataloader.py  --env_name MazeEnv --min_max_num_agents 10 20

To post-process dataset (re_preprocess):

python dataloader/BatchDataloader.py  --env_name BoxEnv --min_max_num_agents 1 5 --mode train --re_preprocess
python dataloader/BatchDataloader.py  --env_name MazeEnv --min_max_num_agents 10 20 --mode train --re_preprocess

Training

To run the experiment in framework (MultiAgentSearch):

Train from scratch on BoxEnv

python main.py --env_name BoxEnv --mode train

Train from scratch on MazeEnv

python main.py --env_name MazeEnv --mode train

Train by continuing learning

python main.py --env_name MazeEnv --mode train --con_train True --log_time 1654091511

Test

python main.py --env_name BoxEnv --mode test --log_time 1654091511
python main.py --env_name MazeEnv --mode test --log_time 1658153431

About

The official repo for ICRA 2023 paper 'Accelerating Multi-Agent Planning Using Graph Transformers with Bounded Suboptimality'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published