Rewards, Returns, and Discounting
A reward is local feedback: what happened after one transition. A return is the accumulated consequence of a trajectory. The distinction matters because good behavior often requires looking beyond the next reward. A delivery robot might spend a few extra steps reaching an elevator, then complete the delivery much faster than if it chased the nearest hallway at every turn.
Rewards are often delayed. Working early on a project may feel unrewarding in the moment and later prevent an all-nighter. In a gridworld, each step might cost while the goal gives at the end. The agent needs a way to connect present actions to future consequences.
The discounted return from time is The exponent grows with delay: one-step-later rewards are multiplied by , two-step-later rewards by , and so on.
Discount factor
How much does the future count?
One reward is available now. A larger reward arrives four steps later. Move gamma to see when the delayed reward starts to matter.
Immediate option
Take a reward of 1 now.
1.00
Delayed option
Wait four steps for a reward of 3.
0.19
controls how much we discount the future. When , the agent is myopic: it mostly cares about immediate reward. When , the agent is farsighted: delayed rewards still have substantial weight.
Discounting changes comparisons. A short path to a small reward becomes more attractive when future rewards are heavily discounted. A delayed larger reward becomes more attractive when is high enough for the future to still matter.
Equation Walkthrough
For rewards and , the return is . The exponent counts how delayed each reward is.
What happens to a reward received five steps from now as moves from toward ?