Giter Club home page Giter Club logo

macbf's Introduction

Learning Safe Multi-Agent Control with Decentralized Neural Barrier Certificates

Zengyi Qin, Kaiqing Zhang, Yuxiao Chen, Jingkai Chen, Chuchu Fan

This repository contains the official implementation of Learning Safe Multi-Agent Control with Decentralized Neural Barrier Certificates published at the International Conference on Learning Representations (ICLR), 2021.

Installation

Create a virtual environment with Anaconda:

conda create -n macbf python=3.6

Activate the virtual environment:

source activate macbf

Clone this repository:

git clone https://github.com/Zengyi-Qin/macbf.git

Enter the main folder and install the dependencies:

pip install -r requirements.txt

Cars

In cars, we provide a multi-agent collision avoidance example with the double integrator dynamics. First enter the directory:

cd cars

To evaluate the pretrained neural network CBF and controller, run:

python evaluate.py --num_agents 32 --model_path models/model_save --vis 1

--num_agents specifies the number of agents in the environment. --model_path points to the prefix of the pretrained neural network weights. The visualization is disabled by default and will be enabled when --vis is set to 1.

To train the neural network CBF and controller from scratch, run:

python train.py --num_agents 32

We can add another argument --model_path and point to a pretrained model we want to use.

Drones

In drones, we consider the drone dynamics with 8-dimsional state space. Details of the dynamics can be found in Appendix C of our paper. To experiment with this example, first enter the directory:

cd drones

To evaluate the pretrained neural network CBF and controller, run:

python evaluate.py --num_agents 32 --model_path models/model_save --vis 1

To train the neural network CBF and controller from scratch, run:

python train.py --num_agents 32

The arguments are the same as the cars example.

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.