5.1.6 · D1Reinforcement Learning Foundations

Foundations — Discount factor and returns

2,670 words12 min readBack to topic

Before you can read the parent note fluently, you need to own every symbol it throws at you. Below, each piece is built from zero: plain words → the picture → why the topic needs it. Read top to bottom; each rung stands on the one below it.


1. Time steps: the ticking clock

The symbol is just "which tick are we talking about." When we write , we mean the very next tick. When we write , we mean ticks after — here is just a counter for "how many ticks ahead," and we will lean on it heavily soon.

Figure — Discount factor and returns

Look at the number line above: the black dots are the ticks. The red dot is "now" (); everything to its right is the future the agent still has to live through. This picture is the stage on which every other symbol performs.


2. The action : what the agent does on each tick

Why introduce a symbol for it? Because the timing of everything else hangs on the action. The agent acts (), and only then does the environment respond with a reward. Without naming we could not say "the reward is a consequence of the action." Actions and their rules live inside a Markov Decision Process; here we only need to know that a choice happens on every tick.

Recall On which tick does the agent choose

? On tick — the same tick it is "at." The response to that choice arrives on the next tick.


3. Reward : the score after acting

The subscript matters enormously. Read as "the reward that shows up on tick ." It is the consequence of the action you took at tick .

Figure — Discount factor and returns

In the figure, each arrow points from an action to the reward it produces. Notice every arrow lands one tick later. That staggering is the entire reason the return starts at .


4. The counter and powers

First, pin down the little letter , because it is about to ride on an exponent.

Now the powers:

Why does this appear? Because the discount is applied once per tick into the future. One tick away → one factor of the fade. Two ticks away → two factors, i.e. . The exponent — the same counter we just defined — literally counts "how many ticks into the future is this reward."

Recall Quick check: what is

, and which reward does point at? — the reward on the very next tick is not discounted at all (zero ticks of extra delay). And points at .


5. The discount factor : a dial between 0 and 1

Picture as a dimmer switch on the future:

  • → the future is switched fully off. Only counts. We call this myopic (short-sighted).
  • → the future is switched fully on. Distant rewards count almost as much as near ones. We call this far-sighted.
Figure — Discount factor and returns

The figure plots against for three settings. The red curve () fades slowly — the far future still matters. The steep black curve () collapses almost immediately — that agent barely sees past the next couple of ticks. Every reward gets multiplied by the height of the curve at its tick.


6. The summation sign : adding up a whole stream

You already know (section 4) — here it is the engine of the sum, stepping through every reward in turn. Unrolled, the expression is exactly:

Why the sigma and not just ""? Because we need a precise rule for infinitely many terms. The dots are friendly but vague; tells you exactly which reward gets which power.

Recall What does the

on top of the mean here? The sum never stops — it accounts for rewards infinitely far into the future. Discounting (with ) is what keeps this infinite sum finite.


7. The return : the one number we actually care about

Now every symbol in that line is yours: is now, is the next reward, is the fade dial, counts ticks ahead, applies the fade once per tick, and adds the whole stream. is the single number that answers "how good is the future from here?" — which is precisely what the agent tries to maximise, and what Value functions and Bellman equations average over.


8. Infinity and convergence: does the sum even finish?

Before the guarantee, two pieces of notation:

If you add infinitely many numbers, the total might blow up to . So we need a guarantee. The parent note proves that when every reward satisfies and , the return is finite:

The engine behind that proof is the Geometric series — a sum where each term is a fixed multiple of the last. Its key fact:

The Episodic vs continuing tasks distinction is exactly why this matters: episodes that always end have finitely many rewards, so even gives a finite sum with nothing to prove. But continuing tasks run forever and rely on to stay finite. That is the whole reason the field usually insists on strict discounting.


9. The recursion

Peel the first reward off the front and the rest is the same kind of object, one tick later:

This self-referential equation (the return defined in terms of the next return) is the seed of every Value functions and Bellman equations relation and of Temporal Difference learning. You need to be comfortable that a quantity can be defined in terms of a shifted copy of itself.


How these foundations feed the topic

The diagram below is a dependency map: read it bottom-up. Each box is one symbol you just learned, and an arrow "X → Y" means X is needed to build Y. Start at the clock and the action (top-left inputs); these produce rewards; the counter , powers, and weight those rewards; the sigma adds them into the return ; the geometric series bounds it; the recursion re-folds it — and all of that together is the topic.

Time step t

Reward R at t plus 1

Action A at t

Counter k

Power gamma to the k

Discount factor gamma in 0 to 1

Sum sign sigma

Return G at t

Geometric series

Bounded return

Recursion G equals R plus gamma G next

Discount factor and returns

Concretely: the box "Return G at t" is section 7, "Bounded return" is section 8, and "Recursion" is section 9. Follow any arrow into the bottom box "Discount factor and returns" and you are reading the parent note Discount factor and returns (5.1.6). All of this lives inside a Markov Decision Process, the formal world where states, actions and rewards are defined.


Equipment checklist

Test yourself — cover the right side and answer each aloud before revealing.

What does the action symbol stand for, and on which tick is it chosen?
The choice the agent makes on tick ; its consequence (a reward) arrives on tick .
Read in words, and say why not
"The reward received on the next tick"; the action at is answered by the environment at , so the first earned reward is .
What does the counter point at when ? And when ?
At when , and at when — in general points at .
What does (absolute value) mean?
The size of ignoring its sign — its distance from zero; e.g. .
What exactly is ?
A fixed number at least as large as for every reward, i.e. an upper bound on reward size across all ticks.
What does mean and why does the exponent grow with the future?
multiplied by itself times; one factor of is applied per tick of delay, so a reward ticks ahead carries .
What does equal?
— the next reward is undiscounted.
Unroll for the first three terms
What single question does the return answer?
"How good is the entire future, as one number, counted from tick onward?"
Why does make an infinite reward sum finite, and what breaks at ?
Each term is a shrinking multiple of the last (geometric decay), converging to at most ; at the denominator is , so the bound is undefined and the sum can diverge (safe only for episodes that end).
State the recursion for and say why it's powerful
; it defines the return in terms of the next return, seeding every Bellman/TD update.
What does the notation mean?
is any value from up to and including .