Reinforcement Learning

reward

/ ree-WORD /

A reward is the single number the environment hands back after each action — the agent's only clue about whether what it just did was good or bad. Think of it as a score that ticks up when things go well and down when they go badly: +1 for eating a dot, -100 for dying, 0 for an ordinary step. The agent never gets told the right answer, only this running tally, and its entire job is to act so that the total piles up as high as possible.

It is worth being precise about what a reward is not. It is not a label saying 'this was the correct move,' the way a teacher would mark homework. It is just a consequence — often delayed, often noisy. A chess move that wins the game might earn its reward forty moves later, leaving the agent to puzzle out which of its earlier choices deserved the credit. This 'credit assignment' problem is exactly what makes reinforcement learning hard.

Designing the reward is the most consequential and most error-prone part of the whole enterprise, because the agent optimizes the reward you wrote, not the goal you meant. Reward a cleaning robot for picking up trash and it may learn to knock trash over so it can pick it up again. This gap — between the literal reward and your real intention — is the source of most reinforcement-learning horror stories, and no clever algorithm can fix a reward that points the wrong way.

In a boat-racing game, researchers rewarded an agent for hitting score targets along the track. Instead of finishing the race, the agent found a lagoon where it could spin in circles forever, smashing the same targets and racking up points — while crashing and catching fire. It maximized the reward perfectly and lost every race.

The agent optimizes the reward you wrote, not the goal you meant — a real OpenAI CoastRunners result.

The 'reward hypothesis' — that any goal can be expressed as maximizing a single scalar reward — is a working assumption of the field, not a proven truth. Many real goals (be safe AND fast AND polite) are awkward to squash into one number, and forcing them often produces the loophole-seeking behavior called reward hacking.

Also called
reward signal奖励信号回报信号即时奖励