hindsight-experience-replay  by TianhongDai

PyTorch implementation of Hindsight Experience Replay (HER)

created 6 years ago
433 stars

Top 69.8% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a PyTorch implementation of Hindsight Experience Replay (HER), a technique designed to improve sample efficiency in reinforcement learning, particularly for sparse reward tasks. It targets researchers and practitioners working with robotic manipulation environments, offering a way to accelerate learning by relabeling past experiences.

How It Works

HER enhances standard off-policy RL algorithms by allowing agents to learn from failed attempts. When an episode finishes without achieving the intended goal, HER replays the trajectory, but with a different, achieved state designated as the new "desired goal." This strategy effectively turns failures into learning opportunities, enabling the agent to learn from states it actually visited, even if the original goal was not met.

Quick Start & Requirements

  • Install via pip (specific commands not provided, but dependencies are listed).
  • Requirements: Python 3.5.2, openai-gym 0.12.5, mujoco-py 1.50.1.56, pytorch 1.0.0, mpi4py.
  • GPU acceleration is supported via a --cuda flag but not recommended without a powerful machine.
  • Setup involves installing dependencies and potentially downloading pre-trained models from Google Drive.

Highlighted Details

  • Implements HER for OpenAI Gym's Fetch robotic environments (Reach, Push, PickAndPlace, Slide).
  • Supports multi-environment execution per MPI process for faster training.
  • Includes plotting and demo capabilities for visualizing training performance and agent behavior.
  • Pre-trained models are available for download.

Maintenance & Community

  • The project appears to be a personal implementation by TianhongDai.
  • No explicit community channels (Discord, Slack) or roadmap are mentioned in the README.

Licensing & Compatibility

  • The README does not explicitly state a license. Given the dependencies and typical RL research practices, it's likely intended for research use. Commercial use would require clarification.

Limitations & Caveats

  • The README notes that GPU usage is not recommended without a powerful machine.
  • Specific versions of mujoco-py and pytorch are recommended to avoid potential bugs and data type errors, suggesting potential compatibility issues with newer versions.
Health Check
Last commit

3 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.