Reinforcement learning formalizes sequential decision-making under uncertainty as a Markov Decision Process (MDP): a tuple (S, A, P, R, γ) where S is the state space, A the action space, P(s'|s,a) the transition probability distribution, R(s,a,s') the reward function, and γ ∈ [0,1) the discount factor.
Reinforcement learning formalizes sequential decision-making under uncertainty as a Markov Decision Process (MDP): a tuple (S, A, P, R, γ) where S is the state space, A the action space, P(s'|s,a) the transition probability distribution, R(s,a,s') the reward function, and γ ∈ [0,1) the discount factor. The Markov property — P(s_{t+1} | s_t, a_t, s_{t-1}, ..., s_0) = P(s_{t+1} | s_t, a_t) — means the current state alone is a sufficient statistic for predicting the future; this is not always true of the raw observations available to an agent (a single video frame doesn't reveal velocity), which is why practical systems often construct a "state" from a history window or a learned representation designed to restore the Markov property.
A policy π(a|s) specifies the agent's behavior. The agent's goal is to find a policy maximizing expected discounted return:
G_t = R_{t+1} + γR_{t+2} + γ²R_{t+3} + ... = Σ_{k=0}^∞ γ^k R_{t+k+1}
γ < 1 both ensures this infinite sum converges for bounded rewards and encodes a preference for sooner rewards over later ones — economically similar to a discount rate, and mathematically necessary for the value functions below to be well-defined on an infinite-horizon problem.
Continue with the book
Explore the full treatment, worked examples, and exercises in The AI Algorithms Compendium.
Companion article for The AI Algorithms Compendium, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
