liveBook · Manning

Markov decision process

As explained in Reinforcement Learning from Human Feedback

A Markov decision process is a mathematical framework that models states, actions, rewards, and probabilistic transitions for sequential decision making under the Markov property.

A Markov decision process (MDP) models sequential decision making as interaction among states, actions, rewards, and transitions. Reinforcement learning uses this structure to estimate reward-to-go and optimize behavior through trial and error. section 10.4 section 6.2

An MDP-based RL formulation typically identifies:

  • States and actions, with a policy π(a|s) selecting actions from states. section 6.2
  • Rewards and discounted returns, where future rewards are accumulated recursively. section 6.2
  • Value functions, which estimate expected return from a state, and state-visitation distributions, which weight frequently visited states. section 6.2
  • Rollouts or trajectories, which estimate objectives from sampled state-action sequences instead of enumerating every state. section 6.2

Token-level language-model RL

In RLHF, a prompt is the starting context, each generated token is an action, and the running prefix is the state. The completion supplies the trajectory and reward; token-level MDP training can then estimate advantages and apply policy updates. section 6.2 section 6.3.2

Equation 6.5
\[\label{eq:policy_objective} J(\theta) \;=\; \sum_{s} d^{\pi_\theta}(s) V^{\pi_\theta}(s).\]

The policy objective sums each policy-conditioned state value weighted by the frequency with which the policy visits that state. section 6.2

How Reinforcement Learning from Human Feedback covers it

How deep it goes
Defines finite-MDP objectives, returns, value functions, and rollout estimates, then connects them to policy-gradient updates.
Examples
Uses RLHF prompts and completions, token-level actions and prefixes, PPO advantages, and sampled trajectories as concrete formulations.
What you can do after
Evaluate/understand how RL objectives represent trajectories, estimate returns, weight states, and update policies from sampled experience.
How it connects
Connects MDPs to reinforcement learning, Bellman equations, value functions, Q-learning, policy gradients, rollouts, and bandit framing.

Also explained in

Compare how 4 books explain Markov decision process →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Reinforcement Learning from Human Feedback. The section links point to the parts of the book it draws on.