A Markov decision process (MDP) models sequential decisions as an agent acting in an environment. Each state describes the current situation, each action can change that state, and rewards express desirable or costly outcomes. section 12.5.1
Grid-world navigation
In a 3 × 4 grid, the agent can move up, down, left, or right. Reaching {0, 3} ends the game with reward 100; entering {1, 3} produces −100, while {1, 1} is an impassable obstacle. The agent must choose a route from a random starting cell. section 12.5.1
The transition function gives the probability of the next state conditional on the current state and chosen action. The Markov assumption says that the current state does not depend on the full prior history once the previous state is known. section 12.5.1 section 12.5.2
Figure 12.27 A simple grid world
Use the grid-world figure to trace legal actions, obstacles, terminal rewards, and routes through states. section 12.5.1
Figure 12.28 The Markov decision process represented as a DAG
Use the causal DAG to connect states, actions, rewards, terminal states, and the transition function as a causal Markov kernel. section 12.5.2



