> ## Documentation Index
> Fetch the complete documentation index at: https://aegean.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Markov Decision Processes

> Planning with a known model through the Bellman equations.

## Learning objectives

After this chapter you can:

* Describe a decision problem as an MDP, with its states, actions, dynamics $p(s', r \mid s, a)$, rewards and discount factor.
* Define the return and the state-value and action-value functions of a policy, and estimate them from sampled trajectories.
* Write the Bellman expectation equations and use them to evaluate a policy.
* Improve a policy by acting greedily with respect to its action values.
* Write the Bellman optimality equations and expand them as a lookahead tree.
* Compute optimal policies with policy iteration, value iteration and q-value iteration.
* Explain how the reward function and the discount factor change the optimal policy.
* Model robot navigation and capacity control as MDPs.
* Describe text generation by a language model as an MDP, and explain why dynamic programming cannot solve it.

## Reading order

The pages follow this sequence, grouped as in the sidebar. Select a box to open its page.

```mermaid theme={null}
graph TB
    subgraph G0 ["Markov Decision Processes"]
        M1["MDP introduction"]
    end
    subgraph G1 ["Bellman Equations"]
        B1["Bellman expectation"]
        B2["Policy evaluation"]
        B3["Policy improvement"]
        B4["Bellman optimality"]
        B5["Recycling robot I"]
    end
    subgraph G2 ["Dynamic Programming"]
        D1["Policy iteration"]
        D2["Value iteration"]
        D3["Recycling robot II"]
        D4["q-value iteration"]
        D5["Gridworld demo"]
    end
    subgraph G3 ["MDP Applications"]
        A1["Navigation, perfect estimation"]
        A2["Navigation, imperfect estimation"]
        A3["Yield management"]
        A4["Language models"]
    end
    M1 --> B1 --> B2 --> B3 --> B4 --> B5
    B5 --> D1 --> D2 --> D3 --> D4 --> D5
    D5 --> A1 --> A2 --> A3 --> A4
    click M1 "/aiml-common/lectures/mdp/mdp-intro/index"
    click B1 "/aiml-common/lectures/mdp/bellman-expectation-backup/index"
    click B2 "/aiml-common/lectures/mdp/policy-evaluation/index"
    click B3 "/aiml-common/lectures/mdp/policy-improvement/index"
    click B4 "/aiml-common/lectures/mdp/bellman-optimality-backup/index"
    click B5 "/aiml-common/lectures/mdp/bellman-optimality-backup/mdp-tree-expansion/mdp-tree-expansion"
    click D1 "/aiml-common/lectures/mdp/dynamic-programming-algorithms/policy-iteration/index"
    click D2 "/aiml-common/lectures/mdp/dynamic-programming-algorithms/value-iteration/index"
    click D3 "/aiml-common/lectures/mdp/dynamic-programming-algorithms/value-iteration/recycling-robot/index"
    click D4 "/aiml-common/lectures/mdp/mdp-workshop/cleaning-robot/index"
    click D5 "/book/mdp/dp-gridworld-demo"
    click A1 "/aiml-common/lectures/reinforcement-learning/robot-navigation/navigation-mdp/index"
    click A2 "/aiml-common/lectures/reinforcement-learning/robot-navigation/navigation-ekf-slam/index"
    click A3 "/aiml-common/lectures/mdp/mdp-workshop/yield-management-capacity-control/index"
    click A4 "/aiml-common/lectures/mdp/mdp-language-models/index"
    classDef page fill:#1d4ed8,stroke:#60a5fa,stroke-width:2px,color:#fff,font-weight:normal
    classDef grp fill:#64748b14,stroke:#64748b,stroke-width:1px
    class M1,B1,B2,B3,B4,B5,D1,D2,D3,D4,D5,A1,A2,A3,A4 page
    class G0,G1,G2,G3 grp
```

***

Found an error on this page? [Report an issue](https://github.com/aegean-ai/eaia-feedback/issues/new?template=page-issue.yml\&page=/book/mdp).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.