Giter Site home page Giter Site logo

mengf1 / hindsight-experience-replay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tianhongdai/hindsight-experience-replay

0.0 0.0 0.0 32.3 MB

This is the pytorch implementation of Hindsight Experience Replay (HER) - Experiment on all fetch robotic environments.

License: MIT License

Python 100.00%

hindsight-experience-replay's Introduction

Hindsight Experience Replay (HER)

This is a pytorch implementation of Hindsight Experience Replay.

Acknowledgement:

Requirements

  • python=3.5.2
  • openai-gym=0.12.5 (mujoco200 is supported, but you need to use gym >= 0.12.5, it has a bug in the previous version.)
  • mujoco-py=1.50.1.56 (Please use this version, if you use mujoco200, you may failed in the FetchSlide-v1)
  • pytorch=1.0.0 (If you use pytorch-0.4.1, you may have data type errors. I will fix it later.)
  • mpi4py

TODO List

  • support GPU acceleration - although I have added GPU support, but I still not recommend if you don't have a powerful machine.
  • add multi-env per MPI.
  • add the plot and demo of the FetchSlide-v1.

Instruction to run the code

If you want to use GPU, just add the flag --cuda (Not Recommended, Better Use CPU).

  1. train the FetchReach-v1:
mpirun -np 1 python -u train.py --env-name='FetchReach-v1' --n-cycles=10 2>&1 | tee reach.log
  1. train the FetchPush-v1:
mpirun -np 8 python -u train.py --env-name='FetchPush-v1' 2>&1 | tee push.log
  1. train the FetchPickAndPlace-v1:
mpirun -np 16 python -u train.py --env-name='FetchPickAndPlace-v1' 2>&1 | tee pick.log
  1. train the FetchSlide-v1:
mpirun -np 8 python -u train.py --env-name='FetchSlide-v1' --n-epochs=200 2>&1 | tee slide.log

Play Demo

python demo.py --env-name=<environment name>

Download the Pre-trained Model

Please download them from the Google Driver, then put the saved_models under the current folder.

Results

Training Performance

It was plotted by using 5 different seeds, the solid line is the median value. Training_Curve

Demo:

Tips: when you watch the demo, you can press TAB to switch the camera in the mujoco.

FetchPush-v1 FetchPickAndPlace-v1 FetchSlide-v1

hindsight-experience-replay's People

Contributors

tianhongdai 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.