Rewards and Returns

Imagine training a robot to walk. Every millisecond it must decide how much torque to apply to each joint. It only finds out much later whether those choices led to a graceful stride or a faceplant. Somehow, all of that delayed, scattered feedback has to be compressed into a single number. That number tells the robot "how well am I doing?" That number, and how it accumulates over time, is the subject of this article. In reinforcement learning, the environment communicates with the agent through a scalar signal called the reward. This single channel is deceptively powerful. Entire fields of behavior — cooperation, tool use, deception, curiosity — have emerged in artificial agents. Their only instruction was to maximize a sum of numbers. Understanding precisely what that sum is, how it is computed, and why it must be finite and well-behaved is a prerequisite for everything that follows. This includes Markov Decision Processes, value functions, and policy-gradient methods. This article builds the bridge between the informal agent-environment loop and the formal objects used throughout reinforcement learning theory. We introduce the reward hypothesis, the working assumption that all goals can be represented as maximizing expected cumulative reward. We then define the return — the quantity an agent actually tries to maximize. We treat the two canonical settings: episodic tasks that terminate and continuing tasks that run forever. We show why discounting is the mathematical device that makes both settings tractable, comparable, and well-defined. By the end, you will be able to write down the return for any interaction sequence. You will be able to explain why an undiscounted infinite return can be undefined. You will see exactly where the discount factor enters the recursive structure. Later chapters exploit this structure to build efficient algorithms like value iteration and Q-learning.

Key takeaways
  • The reward signal RtR_t is a scalar emitted by the environment at each time step; the agent's job is to maximize cumulative reward, not immediate reward.
  • The reward hypothesis states that all goals can be represented as maximizing the expected value of cumulative received reward.
  • The return GtG_t formalizes "cumulative future reward from time tt onward" and is the actual optimization target of every RL agent.
  • Episodic tasks have a natural end (terminal state) and use a finite, undiscounted or discounted sum; continuing tasks never terminate and require discounting to keep the return finite.
  • The discount factor γ∈[0,1)\gamma \in [0,1) trades off immediate versus future reward and guarantees convergence of infinite sums under bounded rewards.
  • The return satisfies a recursive identity, Gt=Rt+1+γGt+1G_t = R_{t+1} + \gamma G_{t+1}, which is the seed of the Bellman equations used throughout dynamic programming and value-based RL.
The core insight

An RL agent does not maximize the reward it receives right now — it maximizes the discounted sum of all rewards it expects to receive, forever into the future.

The idea

At each discrete time step t=0,1,2,…t = 0, 1, 2, \dots, the environment sends the agent a reward Rt+1∈RR_{t+1} \in \mathbb{R}, a single real number, immediately after the agent takes action AtA_t in state StS_t and the environment transitions to state St+1S_{t+1}. (The subscript convention Rt+1R_{t+1}, rather than RtR_t, is standard: it emphasizes that the reward is a consequence of the transition out of StS_t, jointly determined by the state, the action, and the next state.) The reward is the only evaluative feedback the agent receives — there is no separate channel that says "that was a good idea" versus "that was efficient" versus "that was safe." Every objective the designer cares about must be folded into this one number. This design choice is elevated to a guiding principle called the reward hypothesis: > All of what we mean by goals and purposes can be well thought of as the maximization of the expected value of the cumulative sum of a received scalar signal (reward). The reward hypothesis is not a theorem — it is an empirical and design commitment. It says that instead of hand-crafting complex, multi-objective goal specifications, we can (and should) try to compress everything the designer cares about into a scalar reward function, and let the agent discover the behavior that maximizes its long-run accumulation. This is what makes reinforcement learning a general framework: chess (reward +1+1 for winning, −1-1 for losing, 00 otherwise), robotics (reward for forward velocity minus energy cost), and dialogue systems (reward for user satisfaction) are all instances of the same mathematical object. Because the agent cares about the future, not just the present reward, we need a way to aggregate an entire trajectory of rewards into one number the agent can compare across actions. That aggregate is the return, denoted GtG_t, and it is formally the quantity the agent seeks to maximize in expectation. The rest of this article is devoted to defining GtG_t correctly in the two settings you will encounter throughout RL: tasks that end, and tasks that don't.

How it works

Episodic tasks: the natural sum

An episodic task has a well-defined endpoint: a special terminal state, after which the interaction resets to a fresh, independent episode. Board games, single trials of a maze, one attempt at parking a car — these are episodic. Let the episode run for TT steps, ending at time TT. The undiscounted return at time tt is simply the sum of all rewards received from t+1t+1 up to the end of the episode:

Gt  =  Rt+1+Rt+2+Rt+3+⋯+RT  =  ∑k=0T−t−1Rt+1+k.G_t \;=\; R_{t+1} + R_{t+2} + R_{t+3} + \cdots + R_T \;=\; \sum_{k=0}^{T-t-1} R_{t+1+k}.

Because TT is finite (with probability 1, in any reasonable episodic task), this sum is a finite sum of finite numbers, so it is always well-defined — no convergence worries.

Continuing tasks: the problem with infinite sums

A continuing task has no terminal state: a thermostat regulating temperature forever, a stock-trading agent, a server load balancer. Here T=∞T = \infty, and the naive analogue of the sum above,

Gt  =  Rt+1+Rt+2+Rt+3+⋯  =  ∑k=0∞Rt+1+k,G_t \;=\; R_{t+1} + R_{t+2} + R_{t+3} + \cdots \;=\; \sum_{k=0}^{\infty} R_{t+1+k},

is an infinite series. If the agent receives, say, a constant reward of +1+1 at every step forever, this sum diverges to +∞+\infty. Two policies that both "succeed forever" would both score +∞+\infty, and the agent would have no way to prefer one over the other — the objective becomes useless for comparison and optimization.

Discounting: the fix

The standard resolution is to introduce a discount factor γ∈[0,1]\gamma \in [0, 1] and define the discounted return:

Gt  =  Rt+1+γRt+2+γ2Rt+3+⋯  =  ∑k=0∞γkRt+1+k.G_t \;=\; R_{t+1} + \gamma R_{t+2} + \gamma^2 R_{t+3} + \cdots \;=\; \sum_{k=0}^{\infty} \gamma^k R_{t+1+k}.

The discount factor γ\gamma determines the present value of future rewards: a reward received kk steps from now is worth only γk\gamma^k of what it would be worth if received immediately.

  • If γ=0\gamma = 0, the agent is myopic: it only cares about the very next reward, Gt=Rt+1G_t = R_{t+1}.
  • As γ→1\gamma \to 1, the agent becomes far-sighted, weighting distant rewards almost as heavily as immediate ones.
  • For 0≤γ<10 \le \gamma < 1 and rewards bounded by some constant Rmax⁡R_{\max}, the series is a geometric series and is guaranteed to converge:
∣Gt∣  ≤  ∑k=0∞γkRmax⁡  =  Rmax⁡1−γ  <  ∞.|G_t| \;\le\; \sum_{k=0}^{\infty} \gamma^k R_{\max} \;=\; \frac{R_{\max}}{1-\gamma} \;<\; \infty.

This single inequality is why discounting is not merely a "trick to make numbers smaller" — it is the mathematical condition that makes the return a well-defined, finite real number that the agent can meaningfully compare across different action choices, even in a task that never ends.

The recursive structure of the return

The definition above expands the return as an infinite sum, but there is an equivalent, and far more useful, recursive definition. Peel off the first term:

Gt=Rt+1+γRt+2+γ2Rt+3+⋯=Rt+1+γ(Rt+2+γRt+3+⋯)=Rt+1+γGt+1.G_t = R_{t+1} + \gamma R_{t+2} + \gamma^2 R_{t+3} + \cdots = R_{t+1} + \gamma \big( R_{t+2} + \gamma R_{t+3} + \cdots \big) = R_{t+1} + \gamma G_{t+1}.

This identity,

Gt=Rt+1+γ Gt+1\boxed{G_t = R_{t+1} + \gamma\, G_{t+1}}

says that "the return from now" equals "the immediate reward" plus "the discounted return from one step later." It holds for both episodic tasks (with the convention that GT=0G_T = 0 at the terminal step, since there is nothing left to accumulate) and continuing tasks (with γ<1\gamma < 1). This recursion is the seed from which the Bellman equation — the central recursive relationship satisfied by value functions — is built; every dynamic-programming and value-based algorithm you will encounter later exploits exactly this one-step unrolling.

A unified notation

To treat episodic and continuing tasks with one formula, it is common to allow γ=1\gamma = 1 for episodic tasks (finite sum, no convergence issue) and γ<1\gamma < 1 for continuing tasks, and to write the return uniformly as

Gt=∑k=0T−t−1γkRt+1+k,G_t = \sum_{k=0}^{T-t-1} \gamma^k R_{t+1+k},

where TT may be ∞\infty. Some formulations unify the two cases further by introducing an absorbing terminal state that transitions to itself forever with reward 00; then an episodic task can formally be treated as a continuing task whose tail contributes nothing to the sum, and a single γ∈[0,1]\gamma \in [0,1] works uniformly.

Algorithmic view: computing returns from a trajectory

Although the return is a definition, not an algorithm, computing it from a recorded trajectory (as is done constantly in Monte Carlo methods, described in later articles) is a simple backward pass that directly exploits the recursion above. ```

# Compute the return G_t for every time step t = 0, ..., T-1

# given a finite reward sequence R[1..T] and discount factor gamma. function COMPUTE_RETURNS(R[1..T], gamma): G = array of length T+1 G[T] = 0 # terminal boundary condition for t = T-1 downto 0: G[t] = R[t+1] + gamma * G[t+1] return G[0..T-1] ``` This runs in a single backward pass over the trajectory. It is correct precisely because it implements the recursion Gt=Rt+1+γGt+1G_t = R_{t+1} + \gamma G_{t+1} derived above, with the base case GT=0G_T = 0 encoding "no more rewards after the episode ends." For continuing tasks, one cannot literally sum to ∞\infty; in practice the return is either (a) estimated by truncating the sum after enough terms that the discarded tail is provably negligible, or (b) replaced by bootstrapped estimates from a learned value function, a topic developed once value functions are introduced.

Figure
Return as a discounted sum of future rewards along a trajectory
S_t S_t+1 S_t+2 S_t+3 S_t+4 ... R_t+1 R_t+2 R_t+3 R_t+4 weight: γ⁰ weight: γ¹ weight: γ² weight: γ³ R_t+1·γ⁰ R_t+2·γ¹ R_t+3·γ² R_t+4·γ³ G_t = R_t+1 + γR_t+2 + γ²R_t+3 + γ³R_t+4 + ...

Complexity & correctness

Space and time to compute returns from a trajectory. Given a recorded finite trajectory of length TT, the backward-pass algorithm above visits each reward exactly once, doing O(1)O(1) work per step (one multiply, one add), so it runs in O(T)O(T) time and, if all returns are retained, O(T)O(T) space (or O(1)O(1) extra space if only the current GtG_t is needed on the fly, streaming backward). This is optimal: any correct algorithm must read every one of the TT rewards at least once, so Ω(T)\Omega(T) time is a lower bound, matching the O(T)O(T) upper bound.

Why the backward recursion is correct. This follows from a simple inductive argument on the recursion Gt=Rt+1+γGt+1G_t = R_{t+1} + \gamma G_{t+1}, with base case GT=0G_T = 0. Base case: at the terminal step TT, there are no more rewards to accumulate, so GT=0G_T = 0 by definition — this matches the convention used to unify episodic and continuing notation. Inductive step: suppose Gt+1G_{t+1} has been correctly computed as ∑k=0T−t−2γkRt+2+k\sum_{k=0}^{T-t-2} \gamma^k R_{t+2+k}. Then

Rt+1+γGt+1=Rt+1+γ∑k=0T−t−2γkRt+2+k=Rt+1+∑k=0T−t−2γk+1Rt+2+k=∑k=0T−t−1γkRt+1+k=Gt,R_{t+1} + \gamma G_{t+1} = R_{t+1} + \gamma \sum_{k=0}^{T-t-2}\gamma^k R_{t+2+k} = R_{t+1} + \sum_{k=0}^{T-t-2}\gamma^{k+1} R_{t+2+k} = \sum_{k=0}^{T-t-1}\gamma^{k} R_{t+1+k} = G_t,

which is exactly the closed-form definition of GtG_t. By induction, the recursion computes the correct return at every tt, and computing it backward from t=T−1t = T-1 down to t=0t=0 correctly uses only already-finalized values.

Why discounting guarantees finiteness (the convergence argument). For a continuing task with ∣Rt∣≤Rmax⁡|R_t| \le R_{\max} for all tt (a mild boundedness assumption satisfied by essentially every practical reward function), the discounted return's absolute value is bounded by a geometric series:

∣Gt∣=∣∑k=0∞γkRt+1+k∣≤∑k=0∞γk∣Rt+1+k∣≤Rmax⁡∑k=0∞γk=Rmax⁡1−γ.|G_t| = \Big|\sum_{k=0}^\infty \gamma^k R_{t+1+k}\Big| \le \sum_{k=0}^\infty \gamma^k |R_{t+1+k}| \le R_{\max}\sum_{k=0}^\infty \gamma^k = \frac{R_{\max}}{1-\gamma}.

The equality ∑k=0∞γk=11−γ\sum_{k=0}^\infty \gamma^k = \frac{1}{1-\gamma} holds whenever ∣γ∣<1|\gamma| < 1, by the standard geometric series formula; the partial sums ∑k=0nγk=1−γn+11−γ\sum_{k=0}^{n}\gamma^k = \frac{1-\gamma^{n+1}}{1-\gamma} converge to 11−γ\frac{1}{1-\gamma} as n→∞n \to \infty because γn+1→0\gamma^{n+1} \to 0. This is precisely why the constraint γ<1\gamma < 1 (not γ≤1\gamma \le 1) is required for continuing tasks: it is the exact condition under which the infinite return is guaranteed to be a finite, well-defined real number regardless of how the reward sequence unfolds.

Tradeoffs in choosing γ\gamma. There is no universally "correct" discount factor — it encodes a modeling choice, not a derived quantity:

  • Small γ\gamma (e.g., 0.90.9) makes the return depend mostly on near-term rewards. Estimation of returns from sampled data has lower variance (fewer terms contribute meaningfully), and value functions are easier to learn, but the resulting policy may be myopic and ignore consequences far in the future.
  • Large γ\gamma (e.g., 0.9990.999) makes the agent plan over long horizons — important for tasks with long-delayed consequences — but the effective horizon 11−γ\frac{1}{1-\gamma} grows, increasing the variance of return estimates and often slowing convergence of learning algorithms.
  • γ=1\gamma = 1 is sometimes used for episodic tasks with a guaranteed, finite horizon, where the convergence issue never arises; using γ=1\gamma = 1 on a continuing task is unsafe unless one switches to a different objective (such as the average reward per step) precisely because the sum can diverge.

Worked example

Consider a small episodic task: a robot navigating a 1×51 \times 5 corridor toward a goal, receiving −1-1 reward per step until it reaches the goal, at which point the episode ends. Suppose one episode produces the reward sequence

R1=−1,R2=−1,R3=−1,R4=−1,R5=+10 (goal reached, episode ends),R_1 = -1,\quad R_2 = -1,\quad R_3 = -1,\quad R_4 = -1,\quad R_5 = +10 \ \text{(goal reached, episode ends)},

so T=5T = 5. Let's compute the return at every time step with two different discount factors, γ=1\gamma = 1 (undiscounted) and γ=0.9\gamma = 0.9, using the backward recursion Gt=Rt+1+γGt+1G_t = R_{t+1} + \gamma G_{t+1}, GT=0G_T = 0.

Undiscounted (γ=1\gamma = 1):

ttGtG_t computationGtG_t
5base case00
4R5+1⋅G5=10+0R_5 + 1\cdot G_5 = 10 + 01010
3R4+1⋅G4=−1+10R_4 + 1\cdot G_4 = -1 + 1099
2R3+1⋅G3=−1+9R_3 + 1\cdot G_3 = -1 + 988
1R2+1⋅G2=−1+8R_2 + 1\cdot G_2 = -1 + 877
0R1+1⋅G1=−1+7R_1 + 1\cdot G_1 = -1 + 766

Sanity check by direct summation: G0=R1+R2+R3+R4+R5=−1−1−1−1+10=6G_0 = R_1+R_2+R_3+R_4+R_5 = -1-1-1-1+10 = 6. Matches.

Discounted (γ=0.9\gamma = 0.9):

ttGtG_t computationGtG_t
5base case00
4R5+0.9⋅G5=10+0.9(0)R_5 + 0.9\cdot G_5 = 10 + 0.9(0)10.010.0
3R4+0.9⋅G4=−1+0.9(10.0)R_4 + 0.9\cdot G_4 = -1 + 0.9(10.0)8.08.0
2R3+0.9⋅G3=−1+0.9(8.0)R_3 + 0.9\cdot G_3 = -1 + 0.9(8.0)6.26.2
1R2+0.9⋅G2=−1+0.9(6.2)R_2 + 0.9\cdot G_2 = -1 + 0.9(6.2)4.584.58
0R1+0.9⋅G1=−1+0.9(4.58)R_1 + 0.9\cdot G_1 = -1 + 0.9(4.58)3.1223.122

Direct-sum check: G0=−1+0.9(−1)+0.81(−1)+0.729(−1)+0.6561(10)=−1−0.9−0.81−0.729+6.561=3.122G_0 = -1 + 0.9(-1) + 0.81(-1) + 0.729(-1) + 0.6561(10) = -1 - 0.9 - 0.81 - 0.729 + 6.561 = 3.122. Matches, confirming both the recursion and the closed-form expansion agree. Notice the qualitative lesson: with γ=1\gamma=1, the +10+10 goal reward is worth exactly 1010 no matter how far away it is; with γ=0.9\gamma = 0.9, the same +10+10 reward, four steps away from t=0t=0, is discounted down to 0.94×10=6.5610.9^4 \times 10 = 6.561 of its face value by the time it is "seen" from t=0t=0. This is exactly why an agent with smaller γ\gamma will prefer a shorter path to the goal even if a longer path eventually yields the same terminal reward — the discounting itself creates an implicit preference for speed, on top of whatever the raw reward function specifies. Now contrast with a continuing task: a server that gets reward +1+1 every single step forever if it stays online. With γ=1\gamma = 1, Gt=1+1+1+⋯=∞G_t = 1+1+1+\cdots = \infty for every tt and every policy that keeps the server alive — utterly useless for comparing an occasionally-crashing policy against a perfectly reliable one, since both could plausibly diverge. With γ=0.99\gamma = 0.99, a policy that is online every step earns Gt=∑k=0∞0.99k=11−0.99=100G_t = \sum_{k=0}^\infty 0.99^k = \frac{1}{1-0.99} = 100, while a policy that crashes and receives 00 reward on 10% of steps earns strictly less than 100100 — a finite, comparable number that correctly ranks policies by long-run reliability.

Common pitfalls & traps

PitfallWhy it happensFix
Using γ=1\gamma = 1 on a continuing (non-terminating) taskThe return sum has infinitely many nonzero terms; it can diverge, making all policies "equally infinite"Use γ<1\gamma < 1, or switch to the average-reward formulation designed for continuing tasks
Off-by-one indexing: writing Gt=Rt+γRt+1+⋯G_t = R_t + \gamma R_{t+1} + \cdotsConfusing "reward received at tt" with "reward received as a result of the action taken at tt"Remember Rt+1R_{t+1} is the reward for the transition out of StS_t; GtG_t starts at Rt+1R_{t+1}, never RtR_t
Forgetting the terminal boundary condition GT=0G_T = 0Treating episodic and continuing recursions identically without handling episode endExplicitly set GT=0G_T = 0 (or use an absorbing zero-reward terminal state) before running the backward recursion
Choosing γ\gamma too close to 11 for a long-horizon task and expecting fast learningEffective horizon 11−γ\frac{1}{1-\gamma} grows very large, increasing variance of Monte Carlo return estimatesStart with a moderate γ\gamma (e.g., 0.95–0.99) and increase gradually, or use bootstrapped value estimates to reduce variance
Conflating "reward" with "return" in casual explanationBoth are scalars describing "goodness," easy to blur informallyReward is a per-step signal from the environment; return is the cumulative, agent-side quantity being optimized
Assuming reward shaping can encode any goal without changing agent behaviorAdding auxiliary rewards to speed up learning can inadvertently shift the argmax policyDesign shaping terms (e.g., potential-based shaping) that provably preserve the optimal policy under the true objective

Pioneers & history

The formalization of reward and return as the objective of adaptive behavior draws on ideas from optimal control, animal learning theory, and stochastic approximation, synthesized into the modern RL formalism largely through the work of Richard Sutton and Andrew Barto, who crystallized the reward hypothesis and the discounted-return formalism into the standard textbook framework used throughout the field.

Origins · 1 minRichard S. Sutton and how this was discovered
RS
Richard S. Sutton
b. 1957 · Co-developer, with Andrew Barto, of the modern reinforcement learning framework, including temporal-difference learning and the standard formulation of reward, return, and value functions used throughout the field

History
1911
— Edward Thorndike's "Law of Effect" proposes that behaviors followed by satisfying consequences are strengthened, an early psychological precursor to reward-driven learning.
1957
— Richard Bellman formalizes dynamic programming and the principle of optimality, providing the recursive machinery later applied to discounted returns.
1961
— Ronald Howard's work on Markov decision processes formalizes discounted cumulative reward as an optimization criterion in operations research.
1988
— Sutton introduces temporal-difference learning, directly exploiting the recursive structure Gt=Rt+1+γGt+1G_t = R_{t+1} + \gamma G_{t+1} of the return.
1998
— Sutton and Barto's Reinforcement Learning: An Introduction codifies the reward hypothesis and the discounted-return formalism as the standard framework taught today.

Where this matters

The discounted return is not an abstract nicety — it is the literal training objective baked into essentially every reinforcement learning system deployed in practice. Deep Q-Networks and their successors, used in game-playing agents from Atari to StarCraft II, learn to estimate GtG_t (via value functions built on the recursion above) directly from pixels. Policy-gradient methods such as REINFORCE, PPO, and actor-critic algorithms explicitly weight the gradient of the policy by sampled or estimated returns. In robotics, the choice of γ\gamma directly determines whether a learned controller optimizes for quick, jerky task completion or smoother, longer-horizon stability. In recommendation systems and RLHF-tuned large language models, the "reward model" that scores an output, combined with a discount factor over a multi-turn conversation, defines the entire optimization target that shapes deployed model behavior. Financial trading agents, HVAC control systems, and data-center cooling optimizers are all, at bottom, engines for maximizing a discounted return under an environment with genuinely never-ending dynamics — the continuing-task setting this article makes precise. Every one of these systems inherits its correctness (and its failure modes, like reward hacking) directly from how carefully the reward and return were specified, which is why this foundational definition anchors the rest of the field, including Markov Decision Processes and Policies and Value Functions.

Ask the tutor: How does the discounted return connect to the Bellman equation and value functions in a full Markov Decision Process?

Why is the reward defined as Rt+1R_{t+1} rather than RtR_t?

The indexing reflects causality: the reward is the consequence of the transition that occurs after the agent takes action AtA_t in state StS_t. The environment must first process the action and move to a new state St+1S_{t+1} before it can determine what reward that transition deserves. Writing the reward as Rt+1R_{t+1} keeps the timeline consistent: at time tt the agent observes StS_t, chooses AtA_t, and only then, as part of the step into t+1t+1, receives Rt+1R_{t+1} alongside St+1S_{t+1}. This convention, while occasionally reversed in older or non-standard texts, is the one used throughout Sutton-Barto-style formalism and avoids ambiguity about whether a reward "belongs" to the state it was received in or the state that caused it.

Can the discount factor γ\gamma change over time or across states?

In the basic formalism, γ\gamma is a fixed constant applied uniformly at every step, chosen once as part of the problem specification. More advanced formulations allow state-dependent or time-varying discounting, useful for example when an episode may terminate stochastically (in which case a state-dependent "continuation probability" plays a role mathematically identical to γ\gamma) or when different parts of a task have different natural time scales. These generalizations preserve the core convergence argument as long as the effective discounting stays uniformly bounded below 1, which keeps the infinite sum finite by the same geometric-series bound derived for constant γ\gamma.

What happens if rewards are unbounded — does the return still converge with γ<1\gamma < 1?

Not necessarily. The convergence guarantee ∣Gt∣≤Rmax⁡1−γ|G_t| \le \frac{R_{\max}}{1-\gamma} explicitly assumes rewards are bounded by some finite constant Rmax⁡R_{\max}. If rewards can grow without bound over time — for instance, growing linearly or exponentially with tt — a discount factor less than 1 may or may not be enough to force convergence, depending on how fast the rewards grow relative to how fast γk\gamma^k shrinks. In virtually all practical RL benchmarks and applications, rewards are clipped or naturally bounded (e.g., ±1\pm 1, or bounded physical quantities), which is precisely what makes the standard discounting argument apply cleanly.

Is the return the same thing as the value function?

No, and this distinction matters a great deal. The return GtG_t is a random variable defined along a single realized trajectory — it depends on which actions were actually taken and which states and rewards actually occurred, including any stochasticity in the environment. The value function, introduced in later articles, is the expected return, taken over all the randomness in the policy and environment dynamics, starting from a given state (or state-action pair). Value functions are what algorithms typically try to estimate or represent explicitly, precisely because they average over the noise present in any single sampled return.

Why not just maximize the immediate reward at every step, and skip returns entirely?

Maximizing immediate reward greedily is myopic and often catastrophic: an agent might grab a small reward now that forecloses a much larger reward later, or walk into a trap that looks locally appealing. A chess-playing agent that greedily maximized "reward this move" would sacrifice its queen for a pawn if the pawn capture happened to be the only reward-bearing move available immediately. The return exists precisely so that the agent's objective accounts for the entire future consequence of a decision, not just its instantaneous payoff — this is what allows RL agents to learn delayed-gratification behaviors like sacrificing material for positional advantage, or investing early effort for a much larger payoff later.

How does discounting relate to interest rates or economic "time preference"?

The analogy is close and useful: γ\gamma plays exactly the role that a discount rate plays in finance, where a dollar received next year is worth less than a dollar today because of inflation, risk, and opportunity cost. Just as 11+r\frac{1}{1+r} discounts a future cash flow at interest rate rr, γ\gamma discounts a future reward. Setting γ=11+r\gamma = \frac{1}{1+r} makes the two formalisms numerically identical. This is not a coincidence — both formalisms exist to solve the same underlying problem: comparing payoffs that arrive at different points in time using a single, consistent numeraire.

Does a higher discount factor always lead to "better" behavior?

Not automatically — it depends on what "better" means for the task and on practical learning constraints. A higher γ\gamma lets the agent value long-term consequences more accurately, which is essential when good behavior only pays off after a long delay (e.g., saving for retirement, or planning several moves ahead in chess). However, higher γ\gamma also increases the effective planning horizon 11−γ\frac{1}{1-\gamma}, which typically increases the variance of sampled returns and can slow down or destabilize learning algorithms that estimate the return from limited experience. In practice, γ\gamma is tuned as a hyperparameter balancing horizon length against learnability.

Before this

Where this leads