Inferensys

Glossary

Markov Decision Process (MDP)

A Markov Decision Process (MDP) is a mathematical framework for modeling sequential decision-making problems, defined by a set of states, actions, transition probabilities, rewards, and a discount factor.
Governance lead reviewing model governance framework on laptop, policy documents visible, executive office setup.
FOUNDATIONAL FRAMEWORK

What is Markov Decision Process (MDP)?

The Markov Decision Process (MDP) is the foundational mathematical framework for modeling sequential decision-making under uncertainty, forming the theoretical bedrock for reinforcement learning and optimal control.

A Markov Decision Process (MDP) is a formal, discrete-time stochastic control model defined by the tuple (S, A, P, R, γ), where S is a set of states, A is a set of actions, P is the state transition probability function, R is the reward function, and γ is a discount factor. The core Markov property assumes the future state depends only on the current state and action, not the full history. The agent's objective is to find a policy—a mapping from states to actions—that maximizes the expected cumulative discounted reward.

MDPs provide the standard formalism for reinforcement learning (RL) problems, where an agent learns an optimal policy through interaction. Solving an MDP involves computing a value function or Q-function that satisfies the Bellman equation. Algorithms like value iteration, policy iteration, and modern deep RL methods are designed to find or approximate these solutions. In robotics and embodied AI, MDPs model tasks where an agent must make a sequence of decisions to achieve a goal, such as navigation or manipulation.

FOUNDATIONAL FRAMEWORK

Core Components of an MDP

A Markov Decision Process (MDP) is a formal mathematical framework for modeling sequential decision-making under uncertainty. It is defined by five core components that together specify the rules of interaction between an agent and its environment.

01

State Space (S)

The State Space is the set of all possible situations or configurations the environment can be in. A state s ∈ S contains all relevant information for decision-making. The Markov Property asserts that the future depends only on the current state, not the history of past states.

  • Examples: A robot's position and velocity on a grid; the current board configuration in a game of chess.
  • Key Distinction: The state must be sufficient for predicting the next state and reward, fulfilling the Markov condition.
02

Action Space (A)

The Action Space is the set of all possible moves or decisions the agent can make. For a given state s, the available actions may be a subset A(s) ⊆ A.

  • Types: Can be discrete (e.g., {left, right, up, down}) or continuous (e.g., a torque value between -1 and 1).
  • In Robotics: Often corresponds to motor commands or joint velocities sent to actuators. The design of the action space directly impacts the complexity of the control policy.
03

Transition Function (P)

The Transition Function, or dynamics model, defines the environment's stochasticity. Formally, P(s' | s, a) is the probability of transitioning to state s' after taking action a in state s.

  • Mechanism: Encodes the rules of the world, including physics and uncertainty.
  • Model-Based vs. Model-Free: If P is known, the agent can use planning (e.g., dynamic programming). If unknown, the agent must learn through interaction (model-free RL).
  • Deterministic Case: A special case where P(s' | s, a) = 1 for a single outcome.
04

Reward Function (R)

The Reward Function provides the agent with a scalar feedback signal R(s, a, s') after each transition. It formally encodes the goal of the task.

  • Design Principle: Rewards should be sparse enough to avoid hacking but dense enough to provide learning signal. Poorly shaped rewards can lead to unintended behaviors.
  • Cumulative Return: The agent's objective is to maximize the expected discounted sum of future rewards: G_t = R_{t+1} + γR_{t+2} + γ²R_{t+3} + ...
05

Discount Factor (γ)

The Discount Factor γ ∈ [0, 1] is a hyperparameter that determines the present value of future rewards. It quantifies the agent's preference for immediate versus long-term reward.

  • γ = 0: The agent is myopic, caring only about the immediate next reward.
  • γ → 1: The agent is far-sighted, valuing future rewards almost equally. Used in episodic tasks with natural termination.
  • Mathematical Role: Ensures the infinite sum of rewards converges in continuing tasks and makes the Bellman equations well-posed.
06

Policy (π) & Value Functions

While not a defining component of the MDP itself, the Policy π(a|s) is the agent's strategy—a mapping from states to probability distributions over actions. From the MDP components, we derive two critical functions for evaluating policies:

  • State-Value Function V^π(s): The expected return starting from state s and following policy π.
  • Action-Value Function Q^π(s, a): The expected return after taking action a in state s and thereafter following π.

The core problem of RL is to find the optimal policy π* that maximizes these value functions.

FOUNDATIONAL FRAMEWORK

How Markov Decision Processes Work

A Markov Decision Process (MDP) is the fundamental mathematical model for sequential decision-making under uncertainty, forming the backbone of reinforcement learning and optimal control.

A Markov Decision Process (MDP) is a formal mathematical framework for modeling sequential decision-making problems where outcomes are partly random and partly under the control of a decision-maker. It is defined by the tuple (S, A, P, R, γ), representing the state space, action space, state transition probability function, reward function, and discount factor. The core Markov property assumes the future state depends only on the current state and action, not the full history, enabling tractable computation of optimal policies.

The objective in an MDP is to find a policy—a mapping from states to actions—that maximizes the expected cumulative discounted reward. This is solved using dynamic programming principles, notably the Bellman equation, which recursively defines the optimal value function. MDPs provide the theoretical foundation for reinforcement learning (RL) algorithms, which learn optimal policies through interaction when the model's dynamics (P and R) are unknown, and are directly applied in robotic control and autonomous systems planning.

APPLICATIONS

MDP Examples in AI & Robotics

Markov Decision Processes provide the mathematical backbone for sequential decision-making. These examples illustrate how the abstract components of an MDP—states, actions, transitions, and rewards—are instantiated in real-world AI and robotic control problems.

02

Game Playing (e.g., Chess, Go)

Board games are perfect-information MDPs. The state is the board configuration. Actions are legal moves. The transition is deterministic (move execution). Reward is +1 for win, -1 for loss, 0 for draw. The immense state space requires function approximation (like AlphaZero's neural networks) to estimate values and learn a superhuman policy through self-play and reinforcement learning.

03

Inventory Management

This is a classic operations research problem modeled as an MDP. The state is current stock levels. The action is how much to order. Transition probabilities model stochastic customer demand. The reward is profit from sales, minus holding and shortage costs. The optimal policy specifies order quantities for each stock level to maximize long-term profit, balancing the risk of overstocking against stockouts.

05

Healthcare Treatment Scheduling

Personalized medicine can be framed as an MDP. The state is patient health metrics and treatment history. Actions are treatment choices (e.g., drug type, dosage). Transitions model the probabilistic progression of the disease and side effects. Reward is a composite of health improvement, quality of life, and cost reduction. The goal is to learn a treatment policy that maximizes a patient's long-term health outcome.

06

Network Resource Allocation

Managing data traffic in a communications network is a complex MDP. The state includes queue lengths and channel conditions. Actions involve routing paths and bandwidth allocation. Transitions depend on random packet arrivals and link failures. Reward is based on throughput and minimized latency. The optimal policy dynamically allocates resources to maintain service quality under uncertainty.

COMPARISON

MDP Variants and Extensions

A comparison of core mathematical extensions to the standard Markov Decision Process framework, detailing their key features and typical applications in reinforcement learning and control.

Feature / ExtensionPartially Observable MDP (POMDP)Constrained MDP (CMDP)Multi-Agent MDP (MMDP)Hierarchical MDP (HMDP)

Core Extension

States are not directly observable

Optimization with safety/constraints

Multiple interacting agents

Temporal abstraction via subtasks

State Representation

Belief state (probability distribution)

Standard state + constraint state

Joint state of all agents

State + current subtask/option

Primary Objective

Maximize expected discounted reward

Maximize reward subject to constraints

Find equilibrium (e.g., Nash)

Maximize reward over abstract actions

Key Challenge

Maintaining belief over true state

Dual optimization (reward vs. cost)

Non-stationarity, credit assignment

Learning useful temporal abstractions

Solution Approach

Belief state MDP, QMDP, POMCP

Lagrangian methods, constrained policy optimization

Independent learners, centralized training

Options framework, MAXQ value decomposition

Typical Application

Robotics with noisy sensors, dialogue systems

Safe robotics, resource-constrained systems

Autonomous driving, game AI, swarm robotics

Long-horizon task decomposition, skill reuse

Planning Complexity

PSPACE-complete

NP-hard (for general constraints)

Computationally intractable in general

Reduced via hierarchy, but design is hard

Common Algorithms

POMCP, QMDP, SARSOP

Constrained Policy Optimization (CPO), Lagrangian PPO

Independent Q-Learning, MADDPG, QMIX

Option-Critic, HIRO, FeUdal Networks

MARKOV DECISION PROCESS (MDP)

Frequently Asked Questions

A Markov Decision Process (MDP) is the foundational mathematical framework for modeling sequential decision-making under uncertainty, central to reinforcement learning and optimal control. These questions address its core components, applications, and relationship to modern algorithms.

A Markov Decision Process (MDP) is a formal mathematical framework for modeling sequential decision-making problems where outcomes are partly random and partly under the control of a decision-maker. It provides the theoretical bedrock for reinforcement learning (RL) and optimal control. An MDP is defined by the 5-tuple (S, A, P, R, γ):

  • S: A finite set of states representing the possible situations of the environment.
  • A: A finite set of actions available to the agent.
  • P(s' | s, a): The state transition probability function, defining the probability of moving to state s' after taking action a in state s. This embodies the Markov property, meaning the future state depends only on the current state and action, not the full history.
  • R(s, a, s'): The reward function, specifying the immediate numerical reward received after transitioning from state s to s' via action a.
  • γ (gamma): The discount factor (0 ≤ γ ≤ 1), which determines the present value of future rewards, balancing immediate versus long-term gain. The agent's goal is to find a policy π(a|s)—a mapping from states to actions—that maximizes the expected cumulative discounted reward, known as the return.
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.