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.
Glossary
Markov Decision Process (MDP)

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.
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.
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.
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.
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.
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
Pis 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) = 1for a single outcome.
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} + ...
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.
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
sand following policyπ. - Action-Value Function Q^π(s, a): The expected return after taking action
ain statesand thereafter followingπ.
The core problem of RL is to find the optimal policy π* that maximizes these value functions.
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.
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.
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.
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.
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.
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.
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 / Extension | Partially 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 |
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 actionain states. 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
stos'via actiona. - γ (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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The Markov Decision Process is the foundational model for sequential decision-making. These related concepts define its core components and the algorithms used to solve it.
Bellman Equation
The Bellman equation is the recursive decomposition at the heart of solving an MDP. It defines the optimal value of a state as the immediate reward plus the discounted value of the best possible next state.
- Value Iteration & Policy Iteration: These fundamental dynamic programming algorithms directly apply the Bellman equation to compute optimal value functions and policies.
- Optimality Principle: The equation formalizes the principle that an optimal policy has the property that whatever the initial state and decision are, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision.
Partially Observable MDP (POMDP)
A Partially Observable Markov Decision Process (POMDP) generalizes the MDP framework for environments where the agent cannot directly observe the true underlying state. Instead, it receives an observation that provides probabilistic information about the state.
- Belief State: The agent maintains a probability distribution over possible states, known as a belief state, which becomes the new basis for decision-making.
- Critical for Robotics: POMDPs are essential for modeling real-world robotics tasks where sensors are noisy and provide incomplete data, such as robot localization or manipulation with occluded objects.
Policy (π)
In an MDP, a policy is the agent's strategy for selecting actions. It defines a mapping from states to actions (deterministic) or to a probability distribution over actions (stochastic).
- *Optimal Policy (π)**: The policy that maximizes the expected cumulative discounted reward from any state.
- Policy Space: The set of all possible policies. Reinforcement learning algorithms search this space, either directly (Policy Gradient Methods) or indirectly via value functions.
Value Function (V, Q)
A value function quantifies the long-term desirability of states or state-action pairs.
- State-Value Function V(s): The expected return starting from state s and following policy π thereafter.
- Action-Value Function Q(s,a): The expected return starting from state s, taking action a, and then following policy π. Also known as the Q-function.
- Goal of RL: Most algorithms aim to accurately estimate these functions (e.g., Q-Learning, DQN) to derive an optimal policy.
Model-Based vs. Model-Free RL
This distinction defines how an RL agent interacts with the MDP's unknown dynamics.
- Model-Based RL: The agent learns (or is given) an explicit model of the environment's transition function T and reward function R. It uses this model for planning (e.g., via Model Predictive Control) to improve sample efficiency.
- Model-Free RL: The agent learns a policy or value function directly from experience without ever constructing an explicit model of the environment dynamics. Q-learning and Policy Gradient methods are model-free.
Exploration vs. Exploitation
The fundamental trade-off an agent faces in an MDP with unknown rewards and dynamics.
- Exploitation: Choosing the action that currently seems best according to the agent's learned value estimates.
- Exploration: Choosing a sub-optimal action to gather more information about the environment, which may lead to higher long-term reward.
- Balancing Mechanisms: Algorithms employ strategies like ε-greedy, Upper Confidence Bound (UCB), or intrinsic curiosity rewards to manage this trade-off and avoid converging to sub-optimal policies.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us