GithubHelp home page GithubHelp logo

kastnerkyle / safeoptioncritic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arushijain94/safeoptioncritic

0.0 2.0 0.0 235 KB

Safe Option-Critic: Learning Safety in the Option-Critic Architecture

Python 24.19% Jupyter Notebook 75.81%

safeoptioncritic's Introduction

SafeOptionCritic

We introduce a novel framework known as "Safe-Option-Critic" (SOC), which provides safety in Option framework. Here safety is defined as "Prevention from accidents in ML systems due to poor designing on AI systems". Options provide a method to incorporate temporal abstractions in RL setting. Here is link to Between MDPs and semi-MDPs: A framework for temporal abstraction in reinforcement learning. The Option-Critic Architecture provides a method for end-to-end learning of options including option policies, termination condition and policy over options.

Getting Started

The repo contains code for running SOC framework on tabular and continous state-space environments. For experiments in ALE see repo

Prerequisites

* Numpy
* OpenAI Gym
* Matplotlib
* Seaborn

Environments Used

  • Frozen FourRoom Env [fourrooms.py]
  • GYM CartPole Env

Training

The following command is used for training Tabular (FrozenFourRoom Environment)

python FourRoomSOC.py --nruns 150 --nepisodes 2000 --beta 0.05 --controllability True

Use deafult parameters in code for best setting

The following command is used for training Continuous State Space Env : GYM Cartpole Env

python CartPoleSOC.py --nruns 50 --nepisodes 2000 --beta 0.25 --controllability True

Plotting FourRoom Policies and Option Termination

Use the following PolttingPolicies.ipynb (iPython Notebook) for visualization of option policies and option termination in Frozen FourRoom Env.

Plotting Return plots

Use the following ReturnPlots.ipynb (iPython Notebook) for visualization of return plots in Frozen FourRoom Env and CartPole Env.

safeoptioncritic's People

Contributors

arushijain94 avatar

Watchers

James Cloos avatar paper2code - bot 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.