Benchmarking Potential Based Rewards for Learning Humanoid Locomotion

Se Hwan Jeon, Steve Heim, Charles Khazoom, Sangbae KimarXiv 2023 · DOI

Abstract

Reinforcement learning (RL) for high-dimensional robotic systems often relies on reward shaping to guide the learning process. However, traditional Direct Reward Shaping (DRS) frequently leads to "reward hacking" and requires sensitive hyperparameter tuning. This study benchmarks Potential-Based Reward Shaping (PBRS) against standard methods using the MIT Humanoid in a running task. Results demonstrate that while PBRS provides marginal improvements in convergence speed, its primary advantage lies in its significant robustness to reward weight scaling and reduced performance variance across training runs.

Introduction

Designing effective reward functions is one of the most challenging aspects of Reinforcement Learning (RL). For complex tasks like humanoid locomotion, a simple "sparse" reward (e.g., +1 for reaching a goal) is often insufficient for an agent to discover the necessary coordination. Engineers typically employ "reward shaping"—adding auxiliary reward terms for orientation, height, or joint limits—to guide the agent toward desirable behaviors.

However, standard Direct Reward Shaping (DRS) is notoriously fragile. If shaping rewards are weighted too heavily, the agent may prioritize them over the primary task, leading to "reward hacking." For instance, a robot might learn to stand perfectly still to maximize a "height" reward rather than attempting to run. This paper investigates whether Potential-Based Reward Shaping (PBRS), a framework theoretically designed to maintain policy invariance, can mitigate these issues in high-dimensional 3D humanoid control.

Methodology

The researchers utilized the MIT Humanoid, an 18-degree-of-freedom platform, simplified to 10 degrees for the legs in this study. Training was conducted using the Proximal Policy Optimization (PPO) algorithm within the NVIDIA Isaac Gym simulator, which allows for high-throughput parallel simulation.

The study compared three distinct reward structures:

  1. Baseline: Essential rewards only (velocity tracking, energy efficiency, and joint limits).
  2. Direct Reward Shaping (DRS): Instantaneous rewards for maintaining specific orientations, heights, and joint symmetries.
  3. Potential-Based Reward Shaping (PBRS): Reformulating shaping rewards into a "potential" form.
Comparison of Direct Reward Shaping (DRS) and Potential-Based Reward Shaping (PBRS) frameworks.

In PBRS, the agent is rewarded for moving toward a better state rather than simply being in one. The PBRS term is defined as the difference in "potential" between the current and next state: $P(s_k, s_{k+1}) = \gamma \Phi(s_{k+1}) - \Phi(s_k)$. This formulation ensures that the total reward over a trajectory is less sensitive to the specific path taken, theoretically preserving the optimal policy of the original MDP.

Results and Discussion

The experimental results highlight a clear distinction between convergence speed and training stability. While all methods converged within approximately 30 minutes of wall-clock time, PBRS demonstrated superior robustness.

Learning curves comparing Baseline, Direct, and Potential-based reward shaping methods.

Stability and Robustness

PBRS significantly reduced performance variance. Across ten training runs, PBRS showed a variance of 0.946, nearly half that of DRS (1.905) and the baseline (2.025). Furthermore, PBRS proved resistant to "over-tuning." In sensitivity analyses where reward weights were swept from 0.1x to 10x their nominal values, DRS failed at high weights as the robot overfit to shaping signals. In contrast, PBRS maintained high performance across the entire range.

The "Zero-Mean" Effect

A key insight from the study is the "zero-mean" behavior of PBRS. As the robot stabilizes and reaches a steady state, the difference in potential between successive states naturally approaches zero. This allows the primary task rewards (like velocity tracking) to dominate the final stages of training, preventing the shaping rewards from interfering with the fine-tuning of the optimal gait.

Qualitative Performance

Beyond metrics, PBRS produced more natural locomotion. While the baseline often resulted in "pigeon-toed" gaits to maintain balance, PBRS consistently generated natural "heel-toe" transitions. The final controller achieved impressive performance, with forward velocities reaching ~3.5 m/s.

Conclusion

This benchmarking study confirms that Potential-Based Reward Shaping is a powerful tool for humanoid robotics. While it may not drastically speed up training in all scenarios, its ability to provide stable, robust learning that is resistant to reward hacking makes it a superior choice for complex control tasks. Future work will explore the application of PBRS in hierarchical RL and the use of learned value functions as automated potential signals.

Summary updated

BibTeX
@misc{jeon2023benchmarking,
  author = {Se Hwan Jeon and Steve Heim and Charles Khazoom and Sangbae Kim},
  title = {{Benchmarking Potential Based Rewards for Learning Humanoid Locomotion}},
  year = {2023},
  eprint = {2307.10142},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.10142},
}
Figure