Automating Reinforcement Learning with Example-based Resets

Jigang Kim, Jae Hyeon Park, Daesol Cho, H. Jin Kim · DOI

Introduction

Reinforcement Learning (RL) has demonstrated remarkable success in solving complex motor tasks through trial and error. However, a significant barrier to deploying RL in real-world robotics is the "reset problem." Most standard RL algorithms assume the existence of an automated reset function—a "magical button" that teleports the robot back to its starting configuration after every attempt. In practice, this often requires a human operator to intervene, manually resetting the environment. This human-in-the-loop requirement limits the autonomy and scalability of robotic learning. This paper introduces a framework to automate these resets using a learned "reset agent" guided by examples of initial states.

A Dual-Agent Framework for Autonomous Resets

The proposed method utilizes a dual-agent architecture to eliminate the need for manual intervention. The system consists of two distinct policies:

  1. The Forward Agent: This agent is responsible for learning the primary task (e.g., peg insertion or ball catching) using standard reinforcement learning techniques.
  2. The Reset Agent: This agent learns to return the environment to the initial state distribution $p(s_0)$.
The dual-agent architecture featuring a forward agent and a reset agent.

Instead of requiring a handcrafted reward function for the reset task, the reset agent employs Recursive Classification of Examples (RCE). By providing the agent with a small set of "success" states (the desired initial positions), the agent learns a classifier to distinguish between these goal states and its current state. This approach effectively transforms a complex control problem into a classification task, allowing the robot to learn how to reset itself without task-specific engineering.

Preemptive Resets and Implicit Curriculum

A key innovation of this framework is the Preemptive Reset Trigger. The reset agent does not simply wait for the forward agent to fail or reach a terminal state. Instead, it continuously monitors its own confidence in being able to successfully perform a reset. If the forward agent enters a state where the reset agent’s uncertainty exceeds a threshold—indicating the robot might be about to enter an "un-resettable" or irrecoverable state, such as falling off a cliff—a reset is triggered immediately.

This mechanism creates an implicit curriculum. Early in the training process, the reset agent is relatively weak and unconfident, leading it to trigger resets frequently and keep the forward agent in a "safe" zone near the starting position. As the reset agent improves, it allows the forward agent to explore further into the environment. This natural scaling of task difficulty ensures that the forward agent only explores regions from which it can reliably return.

Experimental Evaluation

The method was evaluated across a variety of simulated environments in OpenAI Gym and the DeepMind Control Suite, as well as on real-world UR3 robotic manipulators.

Discounted return and manual reset counts across six simulated environments.

As shown in the results above, the proposed method (blue curves) achieves high discounted returns across diverse tasks like ball-in-cup and peg-insertion. Crucially, the number of manual resets (black dashed lines) remains low, demonstrating high autonomy. In the peg-insertion task, the system reduced the need for human intervention by a factor of 10 compared to sparse-reward baselines.

In real-world tests, a 6-DoF UR3 manipulator successfully learned a peg-placement task in 160 minutes and a balancing task in 80 minutes. The system maintained a training time efficiency of approximately 85%, meaning the robot spent the vast majority of its time actively learning rather than waiting for human resets.

Conclusion and Limitations

By automating the reset process through example-based control, this framework significantly enhances the autonomy of robotic reinforcement learning. The system is task-agnostic, requiring only examples of the starting state rather than complex reward engineering.

However, some limitations remain. The current implementation assumes a unimodal initial state distribution; highly diverse starting positions may pose a challenge for the classifier. Additionally, while the preemptive trigger is effective, it is not infallible; in high-risk "cliff" environments, the robot may occasionally enter irrecoverable states before a reset can be triggered. Future work may explore scaling this approach to multi-task settings where a single reset agent supports multiple forward tasks.

Summary updated

BibTeX
@article{kim2022automating,
  author = {Jigang Kim and Jae Hyeon Park and Daesol Cho and H. Jin Kim},
  title = {{Automating Reinforcement Learning with Example-based Resets}},
  journal = {IEEE Robotics Autom. Lett.},
  year = {2022},
  doi = {10.1109/lra.2022.3173039},
}
Figure