Learning Fast Adaptation With Meta Strategy Optimization

Wenhao Yu, Jie Tan, Yunfei Bai, Erwin Coumans, Sehoon Ha

TL;DR

Meta Strategy Optimization (MSO) is a meta-learning framework that enables legged robots to adapt to novel dynamics and rewards in fewer than 15 trials (roughly 75 seconds of data). By explicitly simulating the real-world adaptation process during training, MSO learns a latent "strategy space" that is specifically structured for rapid, sampling-based optimization on physical hardware.

What Problem Does This Paper Address?

Deep Reinforcement Learning (RL) has produced impressive locomotion skills in simulation, but two major hurdles remain for real-world deployment: the Reality Gap and Environmental Diversity.

  1. The Reality Gap: Simulators are never perfect. Differences in motor friction, latency, or mass between sim and reality often cause "brittle" policies to fail immediately on a real robot.
  2. Environmental Diversity: A robot might encounter a weakened motor (due to overheating), a steep slope it never saw in training, or a heavy payload.

Standard solutions like Domain Randomization (DR) create robust policies by training on a wide range of parameters, but they often trade off performance for "averaging"—the resulting gait is safe but suboptimal for any specific condition. Meta-RL aims to solve this by learning to learn, but existing gradient-based methods (like MAML) often struggle with drastic changes in physical dynamics.

Methods

The authors introduce Meta Strategy Optimization (MSO), which builds on the concept of Strategy Optimization (SO).

In standard SO, a "Universal Policy" is trained to take both the robot's state and a latent variable (a "strategy" or "context") as input. At test time, you keep the policy fixed and use a sampling-based optimizer (like Bayesian Optimization) to find the latent variable that yields the highest reward on the real robot.

The MSO Innovation: The "Aha!" moment of MSO is matching the training and testing phases. In previous methods, the latent space was often learned via a simple projection network. MSO, however, incorporates the actual optimization process into the training loop.

  • The Loop: During training, MSO samples a task (e.g., a specific mass or friction). It then runs a mini-optimization to find the best latent variable $c$ for that task using the current policy.
  • The Update: It then updates the policy weights to maximize performance across these optimized strategies.
  • The Result: This process implicitly shapes the latent space to be "search-friendly," ensuring that the sampling-based optimizer used during deployment can find a winning strategy extremely quickly.

The policy itself is trained using Augmented Random Search (ARS), a derivative-free optimization method known for its efficiency in locomotion tasks.

Datasets and Environments

The researchers evaluated MSO using:

  • Robot Hardware: The Ghost Robotics Minitaur, a quadruped robot with eight direct-drive actuators.
  • Simulation: PyBullet physics engine.
  • Training Tasks: A distribution of physics parameters including mass (60%–160%), motor friction, latency (0–80ms), and battery voltage.
  • Evaluation Tasks (Real World):
    • Sim-to-Real Transfer: Moving from flat sim to the real lab floor.
  • Weakened Motors: Reducing the P-gain of two motors by 60%.
  • Slope Climbing: Navigating a 10-degree incline (unseen during training).
  • Evaluation Tasks (Simulated): Carrying a 1kg box (reward change), motor offsets, and extended randomization ranges.

Key Insights and Ideas

  • Consistency is King: By exposing the agent to the same Strategy Optimization process during both training and testing, the policy learns to "expect" that it will be tuned. This eliminates the mismatch found in prior methods (like SO-PUP).
  • Latent Space Shaping: MSO doesn't just learn a gait; it learns a manifold of gaits. The optimization process during training ensures that different points in the 2D latent space correspond to distinct, useful behaviors (e.g., a high-stepping gait for slopes vs. a stable gait for weakened motors).
  • Sample Efficiency: Because the latent space is low-dimensional (2D in this paper), it can be searched much faster than the high-dimensional space of neural network weights.

Key Results

  • Speed of Adaptation: MSO successfully adapted to new scenarios on the real Minitaur in $\le 15$ episodes, which equates to just 75 seconds of real-world data.
  • Superior Performance: In real-world tests, MSO achieved higher average returns and significantly lower variance than Domain Randomization and SO-PUP.
  • Handling Dynamics: On the simulated "Hopper" benchmark, MSO significantly outperformed gradient-based meta-learners (MAML and NoRML) when dynamics were shifted by 100%, proving it is more robust to physical changes than reward-based meta-learners.
  • Qualitative Success: When a motor was weakened, MSO found a strategy to "drag" the leg forward to maintain balance, whereas DR-trained robots simply fell over.

Limitations and Future Work

  • Stationary Environments: MSO assumes the environment remains constant during the 15 adaptation trials. If the terrain changes mid-adaptation (e.g., moving from grass to ice), the current batch optimization would need to restart.
  • Online Adaptation: The authors suggest that a future direction could involve Hierarchical RL, where a high-level policy predicts the latent variable $c$ in real-time based on sensor feedback, rather than relying on a batch of trials.
  • Task Complexity: While effective for locomotion, it remains to be seen how MSO scales to more complex, multi-stage manipulation tasks where the latent space might need to be higher-dimensional.

Summary updated

BibTeX
@article{yu2020learning,
  author = {Wenhao Yu and Jie Tan and Yunfei Bai and Erwin Coumans and Sehoon Ha},
  title = {{Learning Fast Adaptation With Meta Strategy Optimization}},
  journal = {IEEE Robotics Autom. Lett.},
  year = {2020},
  url = {https://openreview.net/forum?id=o5LtYqKQsM},
}
Figure