An agent receives reward +2 at every step forever, with γ=0.9. What is its return? How many steps does it take to collect at least 90% of that return, and what does this say about the "effective horizon" 1/(1−γ)?

Reinforcement learning, Returns and discounting
Level L2 Elementary. Length Short. Nature Mat Mathematical.

What's being asked

Whether you can sum a geometric series for the return and connect γ to how far ahead the agent effectively looks.

Key idea

For a constant reward c, G=c∑k≥0γk=c1−γ. The first n steps give a fraction 1−γn of this, so the discount factor sets a time scale of about 1/(1−γ) steps.

Steps

  1. Write the return as a geometric series: G=2+2(0.9)+2(0.9)2+⋯=2∑k≥00.9k.
  2. Use ∑k≥0γk=1/(1−γ) for γ<1. So G=2/(1−0.9)=20.
  3. The sum of the first n terms is 20 (1−0.9n), which is a fraction 1−0.9n of G.
  4. Set 1−0.9n≥0.9, so 0.9n≤0.1 and n≥ln⁡0.1/ln⁡0.9≈21.85. Hence n=22 steps. Check: 0.921≈0.109 (too big) and 0.922≈0.0985.
  5. Compare with 1/(1−γ)=10. About 10 steps carry a fraction 1−0.910≈65% of the return, and about 2 to 3 times that carries almost all of it. So the agent effectively looks about 10 to 20 steps ahead.

Common mistakes

How long your answer should be

5–6 lines.

Last checked on 4 December 2026.

Read this

Previous in Reinforcement learning: An episode gives rewards r1=1, r2=0, r3=2, r4=3 and then ends. With γ=0.5, compute the returns G0,G1,G2,G3. Which recursion lets you compute them quickly?
Next in Reinforcement learning: An agent has four actions with estimated values Q=(1,3,2,0) and uses ε-greedy with ε=0.2, where the random choice is uniform over all four actions. What is the probability of each action, and what is the expected estimated value of the chosen action?