Summary
A Markov decision process specifies sequential decisions through sufficient state, available actions, transitions, rewards, and task boundaries. Bellman equations combine immediate reward with continuation value, then average the environment’s possible outcomes.
In our hypothetical support task, asking for one fact either resolves the request or needs follow-up. Compute this fixed action’s expected return before comparing it with another action.
MDP components
An MDP is often written as :
- : states;
- : actions available in state ;
- : chance of next state after action in state ;
- : reward for the transition;
- : discount factor, with for bounded-reward infinite-horizon guarantees.
A policy gives a distribution over actions in each state.
The Markov property requires state to retain the information predicting transitions and rewards, given the chosen action. Permission checks constrain actions before reward optimization.
Return and value
The discounted return from time is:
The state value under policy is:
The action value is:
averages the policy’s current action; fixes that action, then follows the policy afterward. Here is the reward from the transition beginning at time .
Bellman expectation equations
A value can be written one step at a time:
For action values:
For a terminal indicator , the target is . Actual termination contributes no continuation, even if a stored terminal value is nonzero.
One Bellman backup
Average branch returns by their probabilities rather than choosing the best outcome
Reference drawing
One Bellman backup
Average branch returns by their probabilities rather than choosing the best outcome
Derivation
Action gate: choose only authorized actions before evaluating rewards; reward cannot grant permission.
Bellman optimality
The optimal action value satisfies:
The maximum chooses a future available action, not the most favorable stochastic next state. For bounded rewards and , the Bellman operator is a contraction in the maximum norm.
Evaluate a different policy
New task: evaluate the current follow-up policy rather than its best possible action.
Picture and change: follow-up offers terminal action returns and . The current policy chooses them with probabilities and , so continuation value becomes .
Check: the original action now has value . Always choosing the follow-up return instead gives . Those answer different policy questions.
Use when: the estimand is a declared policy’s return, not optimal continuation.
Small example: a support agent
New task: two identical messages arrive after different verification histories.
Picture and change: retain trusted verification state and enforce the available-action set. When , allow asking or escalating; when , a policy-compliant refund may also be available.
Check: assigning refund reward cannot enable that action when . The visible message alone is insufficient state; inferred confidence cannot manufacture authorization.
Use when: omitted history changes predictions or valid actions.
Why AI labs care
Control, scheduling, recommendations, language-model post-training, and tool-using agents all require a declared decision problem. An algorithm name cannot replace its transition, information, or authority contract.
Partial observability
Noisy observations may omit the Markov state. A belief distribution or justified memory summarizes relevant history; a text prompt is not automatically sufficient. Trusted permission state remains authoritative even when a policy maintains a belief about hidden conditions.
Horizon and discount
Finite-horizon values need time-to-go, either in state or in time-indexed policies and values. An undiscounted continuing task needs additional convergence assumptions; alone supplies no finite-value guarantee. Discounting changes reward preferences, not hard task boundaries. Termination and external truncation need separate bootstrap policies.
In an interview
Can the same location require different actions with one step or two steps remaining?
Answer
Yes. Cashing out gives immediately; waiting gives zero now and enables terminal reward next step. With , cash out when only one step remains; wait when two remain. Location alone cannot encode that distinction for a stationary policy.
Common mistakes
An omitted verification bit plus a callable forbidden action creates a defective environment contract. Penalties do not repair that access path. State estimation, policy evaluation, and authorization answer different questions. Q-learning samples an optimality target; policy-gradient methods optimize policy parameters using their own estimators.
Related: Q-learning, policy-gradient methods, and RL environments and graders.