Reward
In reinforcement learning (RL), a reward is the feedback signal provided to an agent after performing an action in a given state. It quantifies how good or bad the action was and serves as the basis for learning optimal behavior.
Background
Rooted in behavioral psychology, rewards are at the core of RL algorithms. Instead of explicit instructions, agents learn by maximizing cumulative rewards over time, balancing short-term and long-term gains.
Examples
- Games: a chess program gets +1 for winning, –1 for losing.
- Robotics: a robot receives a reward for successfully navigating a maze.
- Recommendation systems: a positive reward when a user clicks on a suggested item.
Strengths and challenges
- ✅ Enables autonomous learning through trial and error.
- ✅ Adaptable across diverse domains.
- ❌ Designing an appropriate reward function is difficult.
- ❌ Poorly designed rewards may lead to unintended behavior (reward hacking).
The reward signal in RL is deceptively simple: a single number summarizing success or failure. Yet its design can make or break the entire learning process. For example, in autonomous driving, a poorly crafted reward might encourage the car to drive endlessly in circles just to avoid penalties, without ever reaching its destination.
Researchers distinguish between sparse rewards (given only at the end of a task, like winning a game) and dense rewards (provided frequently, such as staying close to the center of a road). Sparse rewards are harder to learn from but can be more natural; dense ones accelerate training but risk biasing the agent into shortcuts.
A key insight is that rewards are not just about performance—they embody the values and goals we encode into AI. Misalignment between human intentions and algorithmic incentives leads to problems like reward hacking. This makes careful reward design one of the most delicate and creative aspects of reinforcement learning.
📚 Further Reading
- Sutton, R. S., & Barto, A. G. (2018). Reinforcement Learning: An Introduction.
- Silver, D. (2015). Reinforcement Learning Lectures (UCL).