Reinforcement Learning

Markov Decision Processes

The formal mathematical framework for modeling sequential decision making under uncertainty.

🟡 intermediate4 min readrlfundamentals
A Markov Decision Process (MDP) is the mathematical foundation of Reinforcement Learning. An MDP is defined as a 5-tuple (S, A, P, R, γ): States S, Actions A, Transition Probability P(s'|s,a), Reward function R(s,a,s'), and Discount factor γ ∈ [0, 1). The core assumption is the Markov Property: future state s_{t+1} depends ONLY on current state s_t and action a_t, independent of past history.

The 5-Tuple Definition $(S, A, P, R, \gamma)$

                       REINFORCE ENVIRONMENT LOOP
                         ┌──────────────────┐
                 Action  │                  │  State s_{t+1}
               ┌─────────┤   ENVIRONMENT    ├─────────┐
               │ a_t     │                  │ reward r_{t+1}
               ▼         └──────────────────┘         ▼
       ┌─────────┴────────┐                  ┌────────┴─────────┐
       │     AGENT        │                  │     AGENT        │
       │ Policy π(a|s)    │                  │ Value V(s)       │
       └──────────────────┘                  └──────────────────┘
  1. State Space $S$: Set of all valid environment states.
  2. Action Space $A$: Set of all valid agent actions.
  3. Transition Dynamics $P(s' \mid s, a)$: $P(S_{t+1} = s' \mid S_t = s, A_t = a)$.
  4. Reward Function $R(s, a, s')$: Scalar feedback signal $R_{t+1} \in \mathbb{R}$.
  5. Discount Factor $\gamma \in [0, 1)$: Weighs future rewards relative to immediate rewards.

Cumulative Discounted Return $G_t$

The goal of the agent is to maximize expected cumulative discounted return $G_t$:

$$G_t = \sum_{k=0}^\infty \gamma^k R_{t+k+1} = R_{t+1} + \gamma R_{t+2} + \gamma^2 R_{t+3} + \dots$$

Say this out loud

"An MDP is a 5-tuple (S, A, P, R, γ) defining sequential decision making under the Markov property: future state s_{t+1} depends strictly on current state s_t and action a_t. The agent optimizes policy π(a|s) to maximize expected cumulative discounted return G_t = ∑ γ^k R_{t+k+1}."

Follow-ups to expect

Check yourself

Question 1 of 3

What does the Markov Property state regarding state transitions in a Markov Decision Process?

More in Reinforcement Learning

See all →
Value-Based vs Policy-Based Methods5 minMulti-Armed Bandits4 minProximal Policy Optimization5 min