Code Monkey home page Code Monkey logo

andrewli77 / haar-a-hierarchical-rl-algorithm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kpaonaut/haar-a-hierarchical-rl-algorithm

0.0 1.0 0.0 4.81 MB

Code accompanying HAAR paper, NeurIPS 2019 - Hierarchical Reinforcement Learning with Advantage-Based Auxiliary Rewards

License: Other

Python 35.59% Jupyter Notebook 2.55% Dockerfile 0.04% Shell 0.14% Ruby 0.20% Mako 0.06% CSS 0.67% JavaScript 1.12% HTML 33.18% CMake 1.41% C 19.11% Makefile 5.56% Objective-C 0.23% Less 0.14%

haar-a-hierarchical-rl-algorithm's Introduction

How to run HAAR

Welcome to our code release of Hierachical Reinforcement Learning with Advantage-Based Auxiliary Rewards, accepted to NeurIPS 2019.

Check out the videos and our paper.

We adapted the code from SNN4HRL heavily, and also modified some files in rllab. For historical reasons, some folder names remain the same as in SNN4HRL.

You will have to configure rllab(with mujoco) properly. Our configuration is the same as SNN4HRL, so we encourage you to check out their readme first and have all the dependencies properly installed.

The first step of running HAAR involves pre-training a set of low-level skills, which can be achieved by using SNN4HRL

cd rllab/sandbox/snn4hrl
python runs/train_ant_snn.py

Now you should obtain a .pkl file storing the low-level policy.

Change the path pkl_path in rllab/sandbox/snn4hrl/runs/haar_ant_maze.py to where your pre-trained low-level skills lie (as a pickle file) before running it.

python runs/haar_ant_maze.py

This will give you the result of non-annealed HAAR on Ant Maze environment. The result can be found in rllab/data/local/tmp/exp_name, as a .csv file. The column named wrapped_succesRate indicates the success rate of the ant.

If you desire to run annealed HAAR, change the option in the configuration files inside rllab/sandbox/snn4hrl/runs/configs. Set time_step_agg_anneal to True.

You can also transfer both high and low-level skills learned from a previous task to a new task with transfer.py.

All experimental results are reproducible with this code release. To reproduce/design different experiments, we encourage you to look at files in runs/ and tweak the parameters in configs/.

If you have any questions, please open an Issue on this GitHub page.

haar-a-hierarchical-rl-algorithm's People

Contributors

andrewli77 avatar kpaonaut 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.