Skip to content
Lambdian

Discount factor (γ)

A number between 0 and 1 that makes future rewards count less than immediate ones.

The return weights a reward kk steps in the future by γk\gamma^k. With γ=0.9\gamma = 0.9, a reward 10 steps away is worth about 35% of the same reward now; the effective horizon is about 1/(1−γ)1/(1-\gamma) steps. A small γ\gamma makes the agent short-sighted; close to 1 makes it far-sighted. It also keeps infinite sums of rewards finite.

See it in action