Reinforcement learning

st,at,rt,st+1s_t, a_t, r_t, s_{t+1} State s and action a

sₜ is the state at step t, aₜ the action taken there; s′ is the next state.

In ML papers

In an RL paper, sts_t is the state at time step tt (what the agent observes or what the world is) and ata_t is the action it takes. The policy picks the action, at∼π(⋅∣st)a_t \sim \pi(\cdot \mid s_t), and the environment moves to a new state st+1∼P(⋅∣st,at)s_{t+1} \sim P(\cdot \mid s_t, a_t). A prime, s′s' and a′a', is shorthand for the next state and action when there is no time index.

A run of these, τ=(s0,a0,r0,s1,a1,…)\tau = (s_0, a_0, r_0, s_1, a_1, \ldots), is a trajectory. In RL for language models, the state is the prompt plus the tokens so far and each action is the next token.

Other meanings, by context

How to type it

LaTeXShows
s_tsts_t
a_t \sim \pi(\cdot \mid s_t)at∼π(⋅∣st)a_t \sim \pi(\cdot \mid s_t)
s' the next states′s'

A worked example

(st,at,rt,st+1)=(cell 3,right,0,cell 4)(s_t, a_t, r_t, s_{t+1}) = (\text{cell } 3, \text{right}, 0, \text{cell } 4)

One transition in a grid world: from cell 3, moving right gives no reward and lands in cell 4.

Common confusions

Equations that use it

Related

(S,A,P,R,γ)(\mathcal{S}, \mathcal{A}, P, R, \gamma)State and action spacesrt=R(st,at)r_t = R(s_t, a_t)Reward rπθ(a∣s)\pi_\theta(a \mid s)Pif′(x)f'(x)Prime

Decode this example →