Automatic Goal Generation using Dynamical Distance Learning

Bharat Prakash, Nicholas R. Waytowich, Tinoosh Mohsenin, Tim OatesarXiv 2021

Abstract

Reinforcement Learning (RL) agents can learn to solve complex sequential decision-making tasks by interacting with their environment. However, sample efficiency remains a major challenge, particularly in multi-goal RL where agents must reach various targets to master a task. While humans learn through a strategic curriculum of increasing difficulty, RL agents often struggle with random goal sampling. This paper proposes a method for automatic goal generation using a self-supervised Dynamical Distance Function (DDF). By predicting the dynamical distance between states, the system generates a curriculum of goals at appropriate difficulty levels. Evaluation across several robotic manipulation and navigation tasks demonstrates significant improvements in sample efficiency over standard baseline methods.

The Challenge of Sample Efficiency

Reinforcement Learning agents often require millions of interactions with an environment to learn even seemingly simple tasks. This problem is exacerbated in multi-goal RL settings characterized by sparse rewards. In such scenarios, an agent only receives feedback upon successful completion of a specific goal. If the initial goals are too complex or randomly sampled, the agent may never experience success, leading to a failure to learn.

To address this, researchers look toward curriculum learning—the process of starting with easy sub-tasks and gradually increasing difficulty. The goal of this work is to automate this curriculum so that agents do not waste computational resources on objectives that are either trivial or currently impossible.

The Proposed Framework

The authors introduce a framework for Automatic Goal Generation (AGG) centered on two primary components: a Dynamical Distance Function and a Goal Generator.

The framework for Automatic Goal Generation (AGG) using a Dynamical Distance Function (DDF).

1. Dynamical Distance Function (DDF)

Unlike Euclidean distance, which measures the straight-line distance between two points, the DDF measures the expected number of time steps required for a policy to travel between two states. The authors frame this as a self-supervised classification problem. Instead of predicting an exact number of steps (regression), which can be unstable, they discretize the time steps into logarithmic "bins" (e.g., 1-5 steps, 6-12 steps, etc.). A neural network is then trained to classify pairs of states into these bins.

2. Goal Generator

At the start of each training episode, the generator examines the agent's current state and a batch of previously visited states stored in a Replay Buffer. Using the DDF, it sorts these states by difficulty and samples a goal from the "furthest" reachable bins. This ensures the agent is always operating in a "Goldilocks zone"—practicing tasks that are at the edge of its current capabilities but have been proven reachable in the past.

This system is integrated with Hindsight Experience Replay (HER) and Deep Deterministic Policy Gradient (DDPG) to form a robust underlying RL architecture.

Experimental Evaluation

The method was rigorously tested using the MuJoCo physics engine across four standard benchmarks designed to test different aspects of robotic control and navigation.

The four benchmark environments used for evaluation: (a) Fetch Reach, (b) Fetch Push, (c) Fetch Pick, and (d) Ant Nav.
  • Fetch Reach: Moving a robotic arm to a specific 3D coordinate.
  • Fetch Push: Pushing a puck to a target location on a table.
  • Fetch Pick and Place: Picking up a box and moving it to a target location.
  • Ant Nav: Navigating a four-legged "ant" robot to a target in a grid-based environment.

Key Results and Insights

  • Faster Convergence: In every environment, the HER + AGG method reached high success rates significantly faster than the baseline HER with random goal sampling. This confirms that a structured curriculum allows the agent to build on its successes more effectively.
  • Qualitative Progression: Visual analysis of the FetchReach task confirmed that the generator naturally creates a curriculum. Early in training, goals were clustered near the arm's starting position. As the agent's proficiency grew, the sampled goals moved progressively further away.
  • Stability through Classification: The choice of classification over regression for the DDF proved critical. Logarithmic binning helped balance the training data, as agents naturally encounter many more short-distance state pairs than long-distance ones.

Conclusion and Future Directions

By automating the generation of a learning curriculum through dynamical distance, this research significantly improves the sample efficiency of multi-goal RL. While the current results are promising, the authors identify several areas for future work. Currently, the method relies on access to the robot's underlying state vector; extending this to image-based observations (pixels) is a necessary step for real-world deployment. Additionally, testing the robustness of DDF-based learning on physical hardware remains an open challenge, as does scaling the distance function to handle high-dimensional or highly constrained environments.

Summary updated

BibTeX
@misc{prakash2021automatic,
  author = {Bharat Prakash and Nicholas R. Waytowich and Tinoosh Mohsenin and Tim Oates},
  title = {{Automatic Goal Generation using Dynamical Distance Learning}},
  year = {2021},
  eprint = {2111.04120},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.04120},
}
Figure