Giter VIP home page Giter VIP logo

isaacs's Introduction

Iterative Soft Adversarial Actor-Critic for Safety (ISAACS)

drawing

[Webpage] | [arXiv] | [Paper]

Kai-Chieh Hsu1, Duy Phuong Nguyen1, Jaime F. Fisac

1equal contribution in alphabetical order

Princeton University, L4DC'2023

Please raise an issue or reach out at kaichieh or duyn at princenton dot edu if you need help with running the code.

Installation

  1. use either conda or mamda
  • conda
    git submodule update --init --recursive
    conda create -n isaacs python=3.8
    conda activate isaacs
    conda install cuda -c nvidia/label/cuda-11.8.0
    conda install pytorch pytorch-cuda=11.8 -c pytorch -c nvidia/label/cuda-11.8.0
    conda install -c conda-forge suitesparse jupyter notebook omegaconf numpy tqdm jax casadi gym dill plotly shapely wandb matplotlib
    conda install -c cornell-zhang heterocl  
    pip install -e .
  • mamba
    git submodule update --init --recursive
    mamba create -n isaacs python=3.8
    mamba activate isaacs
    mamba install cuda -c nvidia/label/cuda-11.8.0
    mamba install pytorch pytorch-cuda=11.8 -c pytorch -c nvidia/label/cuda-11.8.0
    mamba install -c conda-forge suitesparse jupyter notebook omegaconf numpy tqdm jax casadi gym dill plotly shapely wandb matplotlib
    conda install -c cornell-zhang heterocl
    pip install -e .
  1. install pyspline

Usage

  • pretrain controller
    python script/pretrain_ctrl.py -cf config/pretrain_ctrl.yaml
  • pretrain a disturbance policy to be a best response to the controller from the previous stage. Note that you need to modify the path in the config. The first version uses the same training script as the one in the third stage. Please see the second version for a cleaner implementation.
    python script/train_isaacs_race_car.py -cf config/isaacs_fix_ctrl.yaml  # ver 1
    python script/pretrain_dstb.py -cf config/pretrain_dstb.yaml  # ver 2
  • run ISAACS training. Note that you need to modify the path in the config.
    python script/train_isaacs_race_car.py
  • test safety filter
    1. get numerical solutions (treated as oracle in the paper) and put it under ckpts/odp/results_lw.pkl (Or, you can modify the path in config/safety_filter.yaml)
    2. run below
    python script/test_safety_filter.py -cf config/safety_filter.yaml

Citation

If you find our paper or code useful, please consider citing us with:

@inproceedings{hsunguyen2023isaacs,
  title = 	  {ISAACS: Iterative Soft Adversarial Actor-Critic for Safety},
  author =    {Kai-Chieh Hsu and Duy P. Nguyen and Jaime F. Fisac},
  booktitle = {Proceedings of the 5th Conference on Learning for Dynamics and Control},
  year =      {2023},
}

isaacs's People

Contributors

kaichiehhsu avatar buzi-princeton avatar haiminclack avatar

Stargazers

Willa Wang Zhicheng avatar Hanyang avatar JUNGEE HONG avatar  avatar Back2Zero avatar  avatar Manasvi Saxena avatar  avatar Allen Z. Ren avatar

Watchers

Gabriele Dragotto avatar Jaime F. Fisac avatar Zixu Zhang avatar

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.