GithubHelp home page GithubHelp logo

cup's Introduction

CUP: Constrained Update Projection Algorithms for Safety Robot Control

Code to reproduce the experiments in CUP: Constrained Update Projection Algorithms for Safety Robot Control

Installation

  1. Clone CUP
git clone https://github.com/BellmanTimeHut/CUP.git
  1. Installations of MuJoCo and SafetyGym are needed.
  2. Create a conda environment
cd CUP
conda env create -f environment.yml
conda activate CUP

Usage

To get start with CUP, run:

python main.py --file-prefix 'Test' --env-id Ant-v3 --algo CUP --constraint velocity --cost-lim 103.12 --seed 1024

Hyperparameters

To obtain the results in our experiments, the following hyperparameters are the required.

Hyperparameter CUP PPO-L TRPO-L CPO FOCOPS
No. of hidden layers 2 2 2 2 2
No. of hidden nodes 64 64 64 64 64
Activation tanh tanh tanh tanh tanh
Initial log std -0.5 -0.5 -1 -0.5 -0.5
Discount for reward $\gamma$ 0.99 0.99 0.99 0.99 0.99
Discount for cost $\gamma_C$ 0.99 0.99 0.99 0.99 0.99
Batch size 5000 5000 5000 5000 5000
Minibatch size 64 64 N/A N/A 64
No. of optimization epochs 10 10 N/A N/A 10
Maximum episode length 1000 1000 1000 1000 1000
GAE parameter (reward) 0.95 0.95 0.95 0.95 0.95
GAE parameter (cost) 0.95 0.95 0.95 0.95 0.95
Learning rate schedule for Actor-Critic True False False False True
Learning rate for policy $3\times10^{-4}$ $3\times10^{-4}$ N/A N/A $3\times10^{-4}$
Learning rate for reward value net $3\times10^{-4}$ $3\times10^{-4}$ $3\times10^{-4}$ $3\times10^{-4}$ $3\times10^{-4}$
Learning rate for cost value net $3\times10^{-4}$ $3\times10^{-4}$ $3\times10^{-4}$ $3\times10^{-4}$ $3\times10^{-4}$
Learning rate for $\nu$ 0.01 0.01 0.01 N/A 0.01
Clip gradient norm True False False False True
L2-regularization coeff. for value net $10^{-3}$ $3\times10^{-3}$ $3\times10^{-3}$ $3\times10^{-3}$ $10^{-3}$
Clipping coefficient N/A 0.2 N/A N/A N/A
Damping coeff. N/A N/A 0.01 0.01 N/A
Backtracking coeff. N/A N/A 0.8 0.8 N/A
Max backtracking iterations N/A N/A 10 10 N/A
Max conjugate gradient iterations N/A N/A 10 10 N/A
Iterations for training value net 1 1 1 80 1
Temperature $\lambda$ 1.5 N/A N/A N/A 1.5
Trust region bound $\delta$ 0.02 N/A 0.01 0.01 0.02
Initial $\nu , \nu_{max}$ 0, 2 0, 1 0, 2 N/A 0, 2

Additional max gradient norm clip for our experiments

Hyperparameter Default for MuJoCo and SafetyGym (Swimmer-v3) (HumanoidCircle-v0)
Critic grad norm (Reward) 0.5 0.5 0.5
Critic grad norm (Cost) 0.5 0.5 0.5
Actor grad norm in policy improvement 0.5 0.5 0.5
Actor grad norm in projection 0.5 10 10

cup's People

Contributors

bellmantimehut avatar

Watchers

 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.