Abstract
Reward design in reinforcement learning (RL) is often an ad-hoc process of trial and error. This paper reveals the hidden costs of this practice: reward functions are frequently "overfit" to specific algorithms and hyperparameters. Through computational experiments and a user study with 30 RL experts, the authors demonstrate that even experienced practitioners often fail to specify tasks correctly, intuitively designing rewards as immediate feedback rather than components of a cumulative optimization target.
Introduction
In reinforcement learning, agents ideally learn from sparse rewards (e.g., 1 for success, 0 otherwise). However, because sparse rewards are difficult to optimize, practitioners often design "dense" reward functions—a process known as reward shaping—to guide the agent. This design process is largely unstandardized and relies on human experts tweaking values until the agent's behavior appears correct. This research investigates two major risks: overfitting (whether a reward function generalizes across algorithms) and misdesign (whether hand-crafted rewards actually represent the intended task).
The Hungry Thirsty Domain
The researchers utilized the "Hungry Thirsty" gridworld domain as a primary benchmark. In this environment, an agent must navigate to find food and water to remain "sated" (not hungry) for as many timesteps as possible.
Methodology
The study employed two distinct approaches:
- Computational Sweep: A massive evaluation of 5,196 reward functions across various algorithms (Q-learning, PPO, DDQN, A2C) and hyperparameters (learning rates, discount factors $\gamma$).
- Expert User Study: 30 RL experts (PhD students and researchers) were tasked with designing a reward function for the Hungry Thirsty domain over one hour. Their thought processes were analyzed using thematic analysis.
Key Results: The Overfitting Trap
A central finding is that reward functions are highly "solver-dependent." A reward function optimized for one algorithm or hyperparameter setting often fails when applied to another. As shown in the table below, the correlation (Kendall’s $\tau_b$) between reward performance rankings across different contexts is remarkably low. For instance, the correlation between PPO and DDQN was near zero (-0.04).
The "Myopic" Bias and Expert Misdesign
The user study revealed a systemic "myopic" bias: humans naturally view rewards as immediate feedback ("this state is good right now"). However, RL agents optimize for the cumulative discounted return. This mismatch led 53% of experts to create reward functions that failed to encode the actual task. For example, a high reward for "being at water" might cause an agent to stay there indefinitely, ignoring hunger. Despite the task's simplicity, 97% of experts felt compelled to shape rewards, often introducing errors that incentivized sub-optimal "cheating" behaviors.
Conclusion
The RL community must move away from treating shaped reward functions as objective "truth." The authors recommend separating the "true" task metric from the training reward, treating the latter as an algorithm-specific hyperparameter. Furthermore, there is a pressing need for design tools, such as Inverse Reward Design, that account for human cognitive biases in task specification.
Summary updated