• Stars
    star
    391
  • Rank 110,003 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 6 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

More Repositories

1

reinforcement-learning-algorithms

This repository contains most of pytorch implementation based classic deep reinforcement learning algorithms, including - DQN, DDQN, Dueling Network, DDPG, SAC, A2C, PPO, TRPO. (More algorithms are still in progress)
Python
662
star
2

integrated-gradient-pytorch

This is the pytorch implementation of the paper - Axiomatic Attribution for Deep Networks.
Python
180
star
3

mosse-object-tracking

This is the implementation of MOSSE tracking algorithm (correlation filter based).
Python
121
star
4

self-imitation-learning-pytorch

This is the pytorch implementation of ICML 2018 paper - Self-Imitation Learning.
Python
64
star
5

distributed-ppo

This is an pytorch implementation of Distributed Proximal Policy Optimization(DPPO).
Python
62
star
6

google-football-pytorch

It's the pytorch implementation of google research football.
Python
38
star
7

metaworld-sac

Python
10
star
8

div-hindsight

This is the official code of our paper "Diversity-based Trajectory and Goal Selection with Hindsight Experience Relay" [PRICAI 2021].
Python
10
star
9

esil-hindsight

This is the official code of our paper "Episodic Self-Imitation Learning with Hindsight" [Electronics 2020].
Python
7
star
10

wavelet-hdr

This is the official code for our paper "Wavelet-Based Network For High Dynamic Range Imaging" [CVIU 2023].
Python
6
star
11

deep-hdr-baselines

Python
6
star
12

react2-code

This is the official code of our paper "Machine Learning to Support Visual Auditing of Home-based Lateral Flow Immunoassay Self-Test Results for SARS-CoV-2 Antibodies" [Communications Medicine 2022].
Python
6
star
13

dockerfiles

It contains the dockerfiles for the purpose of machine learning / deep learning research.
Dockerfile
3
star
14

phd-thesis

TeX
2
star
15

daim-rl

This is the official code of our paper "Diversity-Augmented Intrinsic Motivation for Deep Reinforcement Learning" [Neurocomputing 2021].
Python
1
star
16

DouTu

1
star