Abstract
Domain randomization is a popular technique for improving domain transfer, often used in a zero-shot setting when the target domain is unknown or cannot easily be used for training. In this work, we propose Active Domain Randomization (ADR), a method that moves beyond the standard practice of uniformly sampling environment parameters during training. By using a discriminator to identify environment variations where the agent’s behavior deviates from a reference "default" setting, ADR automatically prioritizes the most informative and challenging scenarios, leading to more robust policies and more reliable sim-to-real transfer.
Introduction
In Reinforcement Learning (RL), Domain Randomization (DR) is a cornerstone technique for "sim-to-real" transfer. The core premise is that training an agent in a simulator with varying physics parameters—such as friction, mass, or motor torque—will yield a policy robust enough to handle the complexities of the physical world.
However, standard Uniform Domain Randomization (UDR), which samples parameters randomly from a fixed range, suffers from two major inefficiencies. First, the agent spends significant training time on "easy" environments it has already mastered. Second, as the parameter space grows, the volume of the search space increases exponentially, making it difficult for the agent to encounter the specific edge cases that typically cause failure in real-world deployments.
Methodology
Active Domain Randomization (ADR) addresses these flaws by treating the selection of environment parameters as a separate RL problem, creating an automated curriculum of difficulty.
The Sampler (SVPG)
Instead of a uniform distribution, ADR employs Stein Variational Policy Gradient (SVPG). SVPG maintains an ensemble of "particles" (sampling policies) that propose environment configurations. This approach balances exploration (discovering new environment types) with exploitation (focusing on known difficult regions).
The Discriminator-Based Reward
To identify "informative" environments, ADR trains a discriminator network. This network analyzes trajectories (sequences of states and actions) and attempts to distinguish whether they originated from the "reference" environment (default settings) or a "randomized" environment proposed by the sampler.
If the discriminator can easily distinguish the two, it indicates that the agent's behavior in the randomized environment differs significantly from its baseline behavior, marking that configuration as "challenging." The sampler is rewarded for finding these discrepancies. As the agent masters these cases and its behavior becomes consistent across domains, the discriminator becomes "confused," forcing the sampler to seek out new, more difficult regions of the parameter space.
Experimental Setup
The researchers evaluated ADR across several physics-based simulation environments and real-world robotic tasks:
- LunarLander-v2: A 2D environment where main engine strength was randomized.
- Pusher-3DOF-v0: A MuJoCo-based task involving a robotic arm pushing a puck, with randomized friction and damping.
- ErgoReacher & ErgoPusher: High-dimensional tasks (8+ parameters) using a 4-DoF robot arm.
- Real-Robot Benchmarks: Policies were transferred zero-shot to a physical Poppy Ergo Jr. robot to test real-world consistency.
Key Results
ADR demonstrated superior generalization and stability compared to traditional UDR methods.
- Generalization: In the LunarLander task, ADR achieved near-expert generalization across all engine strengths. In contrast, UDR failed significantly on lower engine strengths, which represent the most difficult control scenarios.
- High-Dimensional Scaling: In the 8-dimensional ErgoReacher task, UDR policies exhibited high variance and catastrophic forgetting. ADR remained stable, achieving lower error rates by focusing on the "frontier" of difficulty.
- Sim-to-Real Transfer: On the physical Poppy Ergo Jr. robot, ADR policies were significantly more consistent. In the ErgoPusher task, ADR maintained a tight spread of successful outcomes across different friction levels, whereas UDR performance was unpredictable and high-variance.
Conclusion
ADR provides an elegant solution to the inefficiencies of uniform sampling by using trajectory discrepancy as a proxy for difficulty. By automatically generating a curriculum of informative environments, ADR produces agents that are not only more robust within their training distribution but also better at extrapolating to unseen, extreme conditions. Future work may explore extending ADR to non-interpretable dimensions or structural modifications of the simulator environment.
Summary updated