PROJECTENGRAM

MARKOV DECISION PROCESSES

Markov Decision Processes

Tags: #◇Computer Science #◇CSINTSY #◇Markov Decision Processes #◇Problem Solving #◇M6


◇Overview

A Markov Decision Process (MDP) provides a mathematical framework for modeling decision-making in environments where outcomes are uncertain. Unlike standard state-based models where actions deterministically lead to a specific state, MDPs account for the probability that an action might lead to various different states.

Key Components of an MDP:
States (SS): The set of all possible states.
Actions (AA): The set of actions available from a given state.
Transition Distribution T(s,a,s′)T(s, a, s'): The probability of reaching a next state s′s' given the current state ss and action aa.
Reward R(s,a,s′)R(s, a, s'): The reward received after transitioning from ss to s′s' via action aa.
Start / End States.

Goal:
The objective in an MDP is to find an Optimal Policy (πopt\pi_{opt}), which is a rule or strategy defining the best action to take in every state to maximize the expected cumulative reward.

Discount Factor (γ\gamma):
A value between 0 and 1 that determines how much future rewards are valued compared to immediate rewards. A γ\gamma close to 1 heavily weights long-term rewards.

◇Important Formulas

Optimal Value Function (VoptV_{opt}):
Calculates the maximum expected reward achievable from state ss.
Vopt(s)={0if IsEnd(s)max⁡a∈Actions(s)∑s′T(s,a,s′)(R(s,a,s′)+γVopt(s′))otherwiseV_{opt}(s) = \begin{cases} 0 & \text{if IsEnd}(s) \\ \max_{a \in \text{Actions}(s)} \sum_{s'} T(s, a, s') \left( R(s, a, s') + \gamma V_{opt}(s') \right) & \text{otherwise} \end{cases}

Optimal Policy (πopt\pi_{opt}):
Determines the best action to take in state ss.
πopt(s)=arg⁡max⁡a∈Actions(s)∑s′T(s,a,s′)(R(s,a,s′)+γVopt(s′))\pi_{opt}(s) = \arg\max_{a \in \text{Actions}(s)} \sum_{s'} T(s, a, s') \left( R(s, a, s') + \gamma V_{opt}(s') \right)

◇Worked Examples

Iterative Algorithm (Value Iteration / Bellman Equation):

  1. Initialize Vopt(0)(s)=0V^{(0)}_{opt}(s) = 0 for all states ss.
  2. For iteration t=1,2,…t = 1, 2, \dots until convergence:
    For each state ss:
    Vopt(t)(s)=max⁡a∑s′T(s,a,s′)(R(s,a,s′)+γVopt(t−1)(s′))V^{(t)}_{opt}(s) = \max_{a} \sum_{s'} T(s,a,s') \left( R(s,a,s') + \gamma V^{(t-1)}_{opt}(s') \right)
  3. The process repeats until the change in optimal values between iterations falls below a specific threshold. The policy is then extracted using arg⁡max⁡\arg\max.

Transport Puzzle with Uncertainty:
Walking takes 1 min deterministically (cost -1). Taking a tram takes 2 mins (cost -2) but has a 50% chance of failing to move the agent forward. The algorithm iteratively computes expected costs based on probabilities until the optimal path policy stabilizes.

◇References & Navigation

CONFIRMATION // 理解度の確認

ACTIVE RECALL VERIFICATION

Select an answer to verify conceptual comprehension and reveal the technical rationale.

Q1

How does a Markov Decision Process (MDP) differ from standard state-based models like A* search?

Q2

What is the primary objective when solving a Markov Decision Process?

Q3

What role does the Discount Factor (γ\gamma) play in an MDP?

Q4

In the formula for the Optimal Value Function (VoptV_{opt}), what happens when the current state ss is a goal/end state?

Q5

During Value Iteration (Bellman Equation), how does the algorithm determine when to stop iterating?

Markov Decision Processes | PROJECT ENGRAM