Overview

2 Markov Decision Process: Turning Problems intro Solvable Models

This chapter introduces Markov decision processes as a practical way to turn messy, high-dimensional business problems into structured models that can actually be solved. The central idea is to divide complexity into states, actions, transitions, and rewards, but to do so in a way that preserves the relationships between parts of the system. Rather than merely breaking a problem apart, the framework helps reconnect the pieces so that uncertainty, dynamics, and long-term strategy can be handled coherently.

A major theme is the Markov property: the future should depend only on the present state, not on the full history, because carrying all past information quickly becomes computationally infeasible. The chapter explains how good state design is what makes this possible, using examples such as software users, customer support, inventory, and maintenance. It also distinguishes passive evolution in Markov chains from active decision-making in Markov decision processes, where actions change both immediate rewards and future state probabilities, and where a policy guides choices over time with long-term gain in mind.

The chapter then grounds the ideas in a factory production planning example, showing how to define a state, choose actions, model stochastic demand, compute rewards, and compare heuristic policies through simulation. It concludes by emphasizing reward engineering and constraint handling: rewards should be stepwise when possible, constraints should be encoded into the state when feasible, soft constraints can be handled with graded penalties, hard constraints may require action masking, and reward scales must be balanced to avoid misleading incentives. Overall, the chapter sets up MDPs as the foundation for reinforcement learning in business, where thoughtful modeling is just as important as the learning algorithm itself.

Three different types on how a system can evolve moving from one state to another.
Conditional probability of dependency of next state to all previous states.
Software service transitions graph and its matrix representation.
Transition distributions in three different scenarios
Markov chain and Markov decision process.
Two important probability distributions widely used for modeling business processes.
Cumulative profit ($) of following each policy in the planning horizon.
Two sides of reward function and some examples for each part.
An example of reward normalization for a multi objective portfolio optimization

Summary

  • Complex business problems require more than decomposition — they demand structured reassembly, and Markov decision processes offer just that.
  • Markov decision processes break decision-making into states, actions, rewards, and transitions, enabling sequential decision making under uncertainty.
  • State design is the key: a good state captures all essential information to predict what happens next (Markov property). Poor state design breaks predictive power.
  • Markov chains model how systems evolve probabilistically; Markov decision processes extend this by adding control — letting agents make decisions that influence outcomes.
  • A policy maps each state to an action, not for short-term gains but for long-term success — balancing current choices against future consequences.
  • Markov decision process modeling requires clear thinking about business objectives and constraints, which together guide optimal decisions.
  • Most real-world business problems can be modeled as Markov decision processes if states are crafted wisely.
  • Reward functions in business must encode multiple objectives and penalties — they are not just feedback signals but behavioral steering tools.
  • Effective reward engineering means giving feedback at the right time (stepwise rewards), balancing objective and constraint terms, and avoiding scale mismatches.
  • Hard constraints should be enforced using action masking and penalty, while soft constraints can be handled just by penalties and dynamic trade-offs.
  • Designing rewards requires careful monitoring to avoid unintended shortcuts, where agents optimize proxy metrics instead of real goals.

FAQ

What is a Markov Decision Process (MDP) in the context of business optimization?An MDP is a structured framework for modeling sequential decision-making under uncertainty. In business problems, it helps represent the current situation as a state, the choices as actions, the uncertainty as transition probabilities, and the outcome as rewards, making complex problems computationally manageable.
Why is state design so important in an MDP?State design is crucial because the state should contain enough information to predict what happens next. If important variables are omitted, the process may no longer be Markovian, and the agent may make poor decisions because it cannot properly account for hidden dependencies.
What is the Markov property?The Markov property means that the future depends only on the current state, not on the full history of past states. If this holds, previous states can be ignored when predicting the next state, which greatly reduces complexity.
How does a Markov chain differ from a Markov Decision Process?A Markov chain describes how a system evolves passively through states according to transition probabilities. An MDP adds actions, meaning an agent can actively influence transitions and rewards through decisions.
What are the main components of an MDP?The main components are state (S), action (A), transition probability/function (P), and reward (R). Together, they define how the environment is represented, how choices affect it, and how success is measured.
Why is the “Buy Pro” example used in the chapter?The “Buy Pro” example is used to illustrate how state transitions can be simulated and analyzed empirically. It helps show that when a system is Markovian, the next-state distribution depends mainly on the current state rather than the full history.
What role does the policy play in an MDP?A policy is the agent’s strategy for choosing actions in each state. It maps states to actions and is designed to maximize long-term reward, not just immediate payoff.
Why are reward engineering and constraint handling important?They are important because business goals are usually multi-objective and constrained. A good reward function guides the agent toward desired outcomes while also discouraging violations such as overspending, overcapacity, or unmet demand.
What is the difference between soft constraints and hard constraints?Soft constraints are preferences or limits that can be violated with a penalty, while hard constraints are absolute rules that must not be broken. Soft constraints can be handled with stepwise penalties, whereas hard constraints often require action masking.
Why does the chapter emphasize long-term thinking over greedy decisions?Because short-sighted choices may look good immediately but lead to worse outcomes later, such as higher backorders, setup costs, or customer loss. A well-designed policy balances immediate rewards with future consequences to maximize total long-term profit.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Applied Reinforcement Learning ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Applied Reinforcement Learning ebook for free