RL Bible

RL Bible · Appendix A

Notation & Conventions

Every symbol used in this book, in one place.

This book uses one consistent notation from the first bandit to the last vision-language-action model. When a chapter introduces a symbol, it uses the convention here; when a paper we teach uses different notation, we translate it into this one and say so. Capital letters denote random variables, lowercase letters denote particular values, and bold is reserved for vectors and matrices where the distinction matters.

1. The Agent–Environment Interface

SymbolMeaning
ttdiscrete time step, t=0,1,2,t = 0, 1, 2, \dots
S\mathcal{S}set of states
A\mathcal{A}, A(s)\mathcal{A}(s)set of actions (available in state ss)
RR\mathcal{R} \subset \Rset of rewards
StS_tstate at time tt (a random variable)
AtA_taction at time tt
Rt+1R_{t+1}reward received after taking AtA_t in StS_t
OtO_tobservation at time tt (partially observable settings)
τ\taua trajectory (S0,A0,R1,S1,A1,R2,)(S_0, A_0, R_1, S_1, A_1, R_2, \dots)
TTfinal time step of an episode

We follow Sutton & Barto's convention that the reward for the transition (St,At)St+1(S_t, A_t) \to S_{t+1} is indexed Rt+1R_{t+1}, not RtR_t: the reward arrives with the next state, one tick after the action that earned it. Some papers (and most deep-RL codebases) write rtr_t for the same quantity; when we quote such a paper we align its indices with ours.

2. Dynamics and the MDP

SymbolMeaning
p(s,rs,a)p(s', r \mid s, a)joint dynamics: probability of next state ss' and reward rr given (s,a)(s,a)
P(ss,a)P(s' \mid s, a)state-transition probability, rp(s,rs,a)\sum_r p(s', r \mid s, a)
r(s,a)r(s, a)expected immediate reward, E[Rt+1St=s,At=a]\E[R_{t+1} \mid S_t = s, A_t = a]
r(s,a,s)r(s, a, s')expected reward given the successor state too
μ0(s)\mu_0(s) or ρ0(s)\rho_0(s)initial-state distribution
γ[0,1]\gamma \in [0, 1]discount factor
dπ(s)d^\pi(s)(discounted) state visitation distribution under π\pi

An MDP is the tuple (S,A,p,γ)(\mathcal{S}, \mathcal{A}, p, \gamma), or (S,A,P,r,γ)(\mathcal{S}, \mathcal{A}, P, r, \gamma) when transition and reward are given separately. Chapter 3 constructs all of this carefully.

3. Returns, Policies, and Value Functions

SymbolMeaning
GtG_treturn from time tt: Gt=k=0γkRt+k+1G_t = \sum_{k=0}^{\infty} \gamma^k R_{t+k+1}
Gt:t+nG_{t:t+n}nn-step return (Chapter 7)
GtλG_t^\lambdaλ-return (Chapter 7)
π(as)\pi(a \mid s)stochastic policy: probability of action aa in state ss
π(s)\pi(s)deterministic policy: the action taken in state ss
πθ\pi_\thetapolicy with parameters θ\theta
Vπ(s)V^\pi(s)state value: Eπ[GtSt=s]\E_\pi[G_t \mid S_t = s]
Qπ(s,a)Q^\pi(s, a)action value: Eπ[GtSt=s,At=a]\E_\pi[G_t \mid S_t = s, A_t = a]
V(s)V^*(s), Q(s,a)Q^*(s, a)optimal value functions
Aπ(s,a)A^\pi(s, a)advantage: Qπ(s,a)Vπ(s)Q^\pi(s, a) - V^\pi(s)
π\pi^*an optimal policy
vπ,qπv_\pi, q_\piSutton & Barto's lowercase equivalents of Vπ,QπV^\pi, Q^\pi — we use the capital forms

Estimates carry hats or subscripted parameters: V^\hat{V}, VθV_\theta, QwQ_w. Target-network parameters are θ\theta^- (Chapter 10). Time-indexed estimates during learning are VtV_t, QtQ_t.

4. Learning Quantities

SymbolMeaning
α\alphastep size / learning rate
ϵ\epsilonexploration probability (ε-greedy)
δt\delta_tTD error: δt=Rt+1+γV(St+1)V(St)\delta_t = R_{t+1} + \gamma V(S_{t+1}) - V(S_t)
et(s)e_t(s) or ztz_teligibility trace (Chapter 7)
λ\lambdatrace-decay / λ-return parameter
ρt\rho_timportance-sampling ratio π(AtSt)b(AtSt)\frac{\pi(A_t \mid S_t)}{b(A_t \mid S_t)}
b(as)b(a \mid s)behavior policy (off-policy learning)
D\mathcal{D}replay buffer or offline dataset
J(θ)J(\theta)policy performance objective, Eπθ[G0]\E_{\pi_\theta}[G_0]
θJ\nabla_\theta Jpolicy gradient
A^t\hat{A}_tadvantage estimate (e.g. GAE, Chapter 11)
η\eta, β\beta, τ\tautemperature / trust-region / soft-update coefficients, per chapter

5. Probability and Analysis

SymbolMeaning
E[X]\E[X], Eπ[]\E_\pi[\cdot]expectation (under policy π\pi)
Var[X]\mathrm{Var}[X]variance
XpX \sim pXX is distributed according to pp
N(μ,σ2)\mathcal{N}(\mu, \sigma^2)Gaussian distribution
DKL(pq)\KL(p \,\|\, q)Kullback–Leibler divergence
H(p)\mathcal{H}(p)entropy
f\|f\|_\inftysup-norm, maxsf(s)\max_s \lvert f(s) \rvert
Tπ\mathcal{T}^\pi, T\mathcal{T}^*Bellman expectation / optimality operators (Chapter 4)
1[]\mathbb{1}[\cdot]indicator function
xyx^\top yinner product; vectors are columns
O()\mathcal{O}(\cdot), O~()\tilde{\mathcal{O}}(\cdot)asymptotic complexity (ignoring log factors)

6. Conventions

  • Expectation subscripts. Eπ[]\E_\pi[\cdot] abbreviates the expectation over trajectories generated by π\pi interacting with the MDP: S0μ0S_0 \sim \mu_0, Atπ(St)A_t \sim \pi(\cdot \mid S_t), St+1P(St,At)S_{t+1} \sim P(\cdot \mid S_t, A_t). When only one random variable matters we name it explicitly, e.g. Eaπ(s)\E_{a \sim \pi(\cdot \mid s)}.
  • Episodic vs. continuing. Episodic tasks terminate at TT; we treat termination as entering an absorbing state with zero reward, so a single set of equations covers both cases (Chapter 3).
  • Greedy operators. arg maxaQ(s,a)\argmax_a Q(s, a) breaks ties arbitrarily unless stated otherwise.
  • Gradients. θ\nabla_\theta denotes the gradient with respect to θ\theta; when the variable is clear from context we write \nabla.
  • Code. Code samples use NumPy for tabular methods and PyTorch for function approximation. Variables in code mirror the math: gamma, alpha, td_error, q_values.
  • Citations. Papers are cited inline by first author and year, with a link, and collected with annotations in the bibliography.

7. Deep-RL and Robotics Notation (Parts II–IV)

SymbolMeaning
θ\theta, ϕ\phi, ψ\psiparameters of policy, value/critic, and model networks respectively
θ\theta^-, ϕ\phi'target-network parameters
L(θ)L(\theta)loss function
πθ(as)\pi_\theta(a \mid s)parameterized stochastic policy
μθ(s)\mu_\theta(s)parameterized deterministic policy (DDPG/TD3)
Qϕ(s,a)Q_\phi(s, a), Vϕ(s)V_\phi(s)parameterized critics
p^ψ\hat{p}_\psilearned dynamics model
ztz_t, hth_tlatent state / recurrent state of a world model (Chapter 23)
o1:to_{1:t}observation history
gggoal (goal-conditioned RL, Chapter 19)
π(as,g)\pi(a \mid s, g)goal-conditioned policy
rϕ(x,y)r_\phi(x, y)reward model over prompt–response pairs (Chapter 20)
at:t+Ha_{t:t+H}action chunk over horizon HH (Chapter 24)

When a chapter needs a symbol not listed here, it defines the symbol at first use and stays consistent within the chapter. If you ever meet an undefined symbol, that is a bug — the notation contract of this book is that everything traces back to this page.