Inferensys

Glossary

Markov Decision Process (MDP)

A mathematical framework for modeling sequential decision-making in stochastic environments, defined by states, actions, transition probabilities, and rewards.
Governance lead reviewing model governance framework on laptop, policy documents visible, executive office setup.
SEQUENTIAL DECISION FRAMEWORK

What is Markov Decision Process (MDP)?

A Markov Decision Process is a mathematical framework for modeling sequential decision-making in stochastic environments, defined by states, actions, transition probabilities, and rewards.

A Markov Decision Process (MDP) is a formal framework for modeling decision-making where outcomes are partly random and partly under the control of a decision-maker. The core components include a set of environment states, a set of actions available to the agent, a transition probability function defining the likelihood of moving between states given an action, and a reward function providing scalar feedback for each transition. The defining Markov property ensures that the future depends solely on the current state and action, not on the history that preceded it.

The objective in an MDP is to discover an optimal policy—a mapping from states to actions—that maximizes the expected cumulative discounted reward over time. Solving an MDP involves balancing immediate rewards against future returns, a trade-off formalized by the Bellman equation. Algorithms like value iteration and policy iteration compute optimal solutions when the model is fully known, while reinforcement learning methods approximate solutions through interaction when transition probabilities are unknown, making MDPs foundational to autonomous supply chain orchestration.

ANATOMY OF A DECISION PROCESS

Core Components of an MDP

A Markov Decision Process is formally defined by five essential elements that together model sequential decision-making under uncertainty. Each component plays a critical role in framing the optimization problem.

01

State Space (S)

The exhaustive set of all possible situations the agent can encounter. A state must capture all relevant information needed to make a decision, satisfying the Markov property—the future depends only on the current state, not the history.

  • Fully Observable: The agent sees the complete environment state (e.g., chess board position)
  • Partially Observable: The agent receives noisy observations (modeled as a POMDP)
  • Continuous vs. Discrete: Inventory levels are continuous; grid-world locations are discrete

Example: In a warehouse robot MDP, a state might encode (x_position, y_position, battery_level, current_task).

S
Mathematical Notation
02

Action Space (A)

The set of all possible moves or decisions available to the agent in each state. Actions transition the environment from one state to another, though the outcome may be stochastic.

  • Deterministic Actions: Always produce the same next state (e.g., moving a robot arm by a fixed increment)
  • Stochastic Actions: Produce a distribution over next states (e.g., a drone navigating wind gusts)
  • Action Masking: Invalid actions in certain states are filtered out (e.g., you cannot 'grasp' if no object is detected)

Example: In a supply chain MDP, actions might be {reorder_100_units, reorder_500_units, do_nothing}.

A(s)
State-Dependent Actions
03

Transition Probability (P)

The dynamics model defining the probability of landing in state s' given the agent took action a in state s. This encodes the environment's stochasticity.

  • P(s' | s, a) is the core mathematical function
  • Deterministic Transitions: P = 1 for exactly one next state, 0 for all others
  • Learned vs. Known: In model-based RL, the agent learns P; in model-free RL, it is never explicitly modeled

Example: A delivery truck choosing 'speed up' has a 90% chance of arriving early and a 10% chance of a weather delay. This uncertainty is captured in the transition matrix.

P(s'|s,a)
Conditional Probability
04

Reward Function (R)

The scalar feedback signal that defines the goal. The agent's objective is to maximize the cumulative reward over time, not just the immediate reward. The reward function shapes behavior.

  • R(s, a): Reward for taking action a in state s
  • R(s, a, s'): Reward that also depends on the resulting state
  • Sparse vs. Dense: +1 only for winning a game (sparse) vs. -1 per time step to encourage speed (dense)
  • Reward Shaping: Adding intermediate rewards to accelerate learning without changing the optimal policy

Example: In a factory scheduling MDP, a reward of +100 for on-time delivery and -50 for each hour of delay.

R(s,a)
Scalar Feedback
05

Discount Factor (γ)

A parameter between 0 and 1 that determines the present value of future rewards. It mathematically bounds the infinite sum of rewards and controls the agent's horizon.

  • γ ≈ 0: Myopic agent, cares only about immediate reward
  • γ ≈ 1: Farsighted agent, values future rewards almost as much as immediate ones
  • Economic Interpretation: Analogous to an interest rate; γ = 1/(1+r)
  • Episodic Tasks: Can use γ = 1 because the horizon is finite

Example: In portfolio optimization, γ = 0.95 reflects a long-term investment horizon. In a short-horizon logistics task, γ = 0.8 prioritizes immediate delivery deadlines.

γ ∈ [0,1]
Temporal Horizon
06

Policy (π)

The agent's strategy—a mapping from states to actions. The policy is the output of solving an MDP and can be deterministic or stochastic.

  • Deterministic Policy π(s): Always selects the same action for a given state
  • Stochastic Policy π(a|s): Defines a probability distribution over actions, enabling exploration
  • Optimal Policy π*: Maximizes the expected cumulative discounted reward from any starting state
  • Value Functions V(s) and Q(s,a): Derived quantities that evaluate how good a state or state-action pair is under a policy

Example: An optimal inventory policy might be: 'If stock < 50 units, order 200 units; otherwise, do nothing.' This is the π* that maximizes long-term profit.

π*(s)
Optimal Strategy
MARKOV DECISION PROCESSES

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the mathematical framework powering sequential decision-making in autonomous systems.

A Markov Decision Process (MDP) is a discrete-time stochastic control framework for modeling sequential decision-making in environments where outcomes are partly random and partly under the control of a decision-maker. An MDP is formally defined by a 5-tuple: a finite set of states (S), a finite set of actions (A), a state transition probability function P(s'|s,a) that defines the probability of moving to state s' after taking action a in state s, a reward function R(s,a) that provides immediate scalar feedback, and a discount factor γ ∈ [0,1] that trades off immediate versus future rewards. The defining characteristic is the Markov property: the future state depends only on the current state and action, not on the history of prior states. At each time step, the agent observes the current state, selects an action according to its policy π, receives a reward, and the environment transitions to a new state. The objective is to find an optimal policy π* that maximizes the expected cumulative discounted reward over a finite or infinite horizon. This framework underpins reinforcement learning algorithms and is used to solve problems ranging from autonomous vehicle navigation to inventory management and robotic control.

SEQUENTIAL DECISION-MAKING

MDP Applications in Supply Chain

Markov Decision Processes provide the mathematical backbone for optimizing sequential decisions under uncertainty in logistics. By framing supply chain challenges as states, actions, rewards, and transition probabilities, MDPs enable autonomous systems to prescribe optimal policies for inventory, routing, and disruption response.

01

Dynamic Inventory Replenishment

MDPs model inventory management as a sequential decision problem where the state is current stock level, the action is order quantity, and the reward balances holding costs against stockout penalties. The optimal policy specifies exactly how much to order at each inventory level, accounting for stochastic demand and variable lead times. Unlike static reorder point systems, MDP-based policies adapt dynamically to changing demand distributions and supplier reliability, minimizing total cost over the planning horizon.

02

Predictive Maintenance Scheduling

Equipment degradation in warehouses and factories follows stochastic patterns that MDPs capture through partially observable states. The agent observes sensor readings (vibration, temperature) representing the machine's hidden health state, then chooses actions: run, inspect, or repair. Rewards encode production throughput minus maintenance costs and failure penalties. The resulting policy prescribes optimal inspection intervals that minimize unplanned downtime while avoiding unnecessary preventive maintenance.

03

Multi-Echelon Stock Allocation

Distributing inventory across a network of regional warehouses and retail locations creates a high-dimensional MDP. The state space captures stock levels at every node; actions represent transshipment quantities between locations. Transition probabilities model demand at each location and shipping delays. Solving this MDP yields policies that automatically rebalance inventory across the network, reducing both stockouts and excess holding costs through coordinated rather than siloed decisions.

04

Disruption Response and Recovery

When a port closure or supplier failure occurs, the supply chain enters a disrupted state requiring rapid reconfiguration. MDPs model this as a contingency planning problem where actions include activating backup suppliers, rerouting shipments, or expediting orders. The reward function penalizes both disruption duration and recovery cost. The optimal policy provides a pre-computed playbook: for each type and severity of disruption, it specifies the cost-minimizing recovery sequence.

05

Last-Mile Fleet Dispatch

Dynamic vehicle dispatch under uncertain demand and traffic conditions is naturally framed as an MDP. The state includes vehicle locations, pending orders, and traffic conditions. Actions assign new orders to specific vehicles. Transition probabilities capture travel time variability and new order arrivals. The reward maximizes on-time deliveries minus fuel and labor costs. This approach outperforms static routing by continuously re-optimizing assignments as conditions evolve throughout the day.

06

Supplier Selection Under Uncertainty

Choosing suppliers involves sequential decisions under evolving information about reliability, quality, and pricing. The MDP state tracks each supplier's performance history and current market conditions. Actions allocate purchase orders across the supplier base. Transition probabilities model supplier learning curves and market fluctuations. The optimal policy balances diversification against consolidation, automatically shifting volume toward reliable suppliers while maintaining relationships with backup options.

DECISION FRAMEWORK COMPARISON

MDP vs. Related Frameworks

How the Markov Decision Process compares to other sequential decision-making and optimization frameworks across key structural dimensions.

FeatureMarkov Decision ProcessMulti-Armed BanditConstraint Programming

State Transitions

Stochastic, depends on current state and action

No state transitions; single stationary environment

Deterministic constraint propagation

Objective

Maximize cumulative long-term reward

Maximize cumulative immediate reward

Find any feasible solution satisfying all constraints

Temporal Horizon

Sequential, multi-step decisions

Single-step, repeated independent trials

Static, single assignment of variables

Feedback Signal

Delayed reward; action affects future states

Immediate reward only; no downstream effects

No reward; feasibility check only

Handles Uncertainty

Optimality Guarantee

Exact for finite, fully observable MDPs

Regret bounds for specific algorithms

Exact if solver completes search

Typical Solution Method

Dynamic Programming, Value Iteration, Policy Iteration

Upper Confidence Bound, Thompson Sampling

Backtracking, Constraint Propagation, Branch and Bound

Markov Property Required

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.