Concepts / Optimal Decision Making in Finite Markov Decision Processes

Optimal Decision Making in Finite Markov Decision Processes

Policy iteration makes progress through a repeating evaluation-improvement cycle.

  • Programming

The Search for a Better Policy

Optimal decision making in a finite Markov decision process can be organized as a repeating search. The method called policy iteration alternates between two jobs: it evaluates the current policy, then uses that evaluation to improve the policy. The evaluation supplies value information, while the improvement stage changes the policy. This cycle continues until no strictly better policy can be produced.

The central mechanism is evaluation followed by improvement. Policy evaluation tells us how good the current policy is; policy improvement uses that information to search for a better policy.

evaluateuse valueschange policyrepeatno better policyCurrent policyPolicy evaluationvalue informationPolicy improvementpolicy changeImproved policyOptimal policy
What happens as policy iteration alternates between evaluating the current policy and improving it?

Following Three Policy Iterations

Consider three successive policies named π0, π1, and π2. These labels do not specify particular actions or rewards; they simply make the control process easier to follow. Begin with π0. Evaluation computes the value function associated with π0. Improvement then uses that evaluation to produce π1. If π1 is not optimal, its evaluation is followed by another improvement step, producing π2. The same pattern continues until improvement no longer produces a strictly better policy.

Tracing the policy sequence

Follow the alternating stages beginning with policy π0.

Start with π0: The algorithm has a current policy that must first be evaluated.

Evaluate π0: The evaluation stage computes the value function associated with π0.

Improve to π1: The improvement stage uses the value information to produce a better policy, π1.

Evaluate π1: The new policy is evaluated before another improvement decision is made.

Improve to π2: If π1 is not optimal, another improvement produces π2.

Stop when improvement ends: The process stops when the improvement stage cannot create a strictly better policy.

Policy iteration follows the repeating pattern evaluation, improvement, evaluation, improvement, until an optimal policy is reached.

Why Improvement Cannot Stall Early

Policy improvement makes strict progress unless the current policy is already optimal. After a policy has been evaluated, the resulting value information is used to decide whether changing the policy can improve it. If a strictly better policy is available, the improvement stage produces one. If no improvement is possible, the current policy is already optimal. Therefore, stopping is not merely a sign that the method happened to stop changing; it identifies the optimality condition described by the policy-iteration result.

evaluateimprovement availableno improvement availableπ0current policyValue informationπ1strictly better policyOptimal policyno better policy
How does comparing action values change the policy, and what indicates that no further improvement is possible?

Why Finiteness Guarantees Termination

A finite Markov decision process has only finitely many possible policies. Policy iteration produces strict improvement whenever the current policy is not optimal. Because an endlessly continuing sequence of strict improvements would require moving through infinitely many distinct policies, the finite policy space makes infinite strict progress impossible. The process must therefore reach an optimal policy after finitely many iterations, along with its optimal value function.

improveimproveimproveπ0initial policyπ1strictly betterπ2strictly betterOptimal policyno further improvement
How can improving policies move through a finite set without continuing forever?

Finiteness does not merely make the problem small. It supplies the reason that strict improvement cannot continue forever: there are only finitely many policies to visit.

Reusing Value Information

Policy evaluation is itself an iterative computation. When a new policy is evaluated, a useful implementation detail is to begin with the value function from the previous policy rather than with an unrelated value function. The previous policy and the newly improved policy are connected by one improvement step, so their value functions may change little. Starting from the previous value function typically makes the next evaluation converge much faster.

evaluateimprovereuse as startevaluateconvergeOld policyπ0Previous valuefunctionstarting informationNew policyπ1Next evaluationfaster convergenceNew value functionvalue of π1
How does the previous value function provide a better starting point for evaluating the newly improved policy?

From Bandits to Multiple States

A useful way to classify reinforcement learning problems is to ask how many states they contain. A bandit problem has only one state. Finite Markov decision processes provide the general problem formulation for reinforcement learning problems with multiple states. Thus, a bandit problem is not unrelated to a finite Markov decision process; it is the special single-state case, while the finite Markov decision process formulation handles the multiple-state setting.

formulationformulationBandit problemone stateSingle stateFinite MDPmultiple statesMultiple states
What is the structural difference between choosing actions in one state and choosing actions across multiple states?
QuestionBandit problemFinite Markov decision process
How many states?One stateMultiple states
How should it be classified?Single-state special caseGeneral multiple-state formulation

The source-grounded distinction is based on the number of states.

EASY

Classify each description as a bandit problem or a multiple-state finite Markov decision process: a reinforcement learning problem described as having one state; a reinforcement learning problem described as having several states.

Hints
  • Start by counting the states mentioned in the description.
  • One state corresponds to the bandit special case.
  • Multiple states correspond to the general finite Markov decision process formulation.

Value Functions and Bellman Equations

Value functions and Bellman equations are central ideas associated with finite Markov decision processes. In the policy-iteration cycle, the value function is the value information produced during policy evaluation and then used during policy improvement. Bellman equations belong to the same central group of ideas for studying finite Markov decision processes. The source identifies these concepts as central without specifying a particular equation or a particular environment.

includesincludessupplies informationcentral to analysissupportsFinite MDPmultiple-state formulationValue functionvalue informationBellman equationscentral ideaPolicy evaluationuses value informationPolicy improvementchanges policy
How do policy evaluation, value functions, Bellman equations, and policy improvement fit together?

Common Classification and Iteration Mistakes

  • Treating a bandit problem and a finite Markov decision process as unrelated problem families.

    A bandit problem is the single-state special case, while finite Markov decision processes are the general multiple-state formulation.

    Fix: Classify by the number of states: one state means bandit special case; multiple states means the general finite MDP formulation.

  • Assuming policy iteration stops whenever the policy happens not to change during one pass.

    The important result is that improvement produces a strictly better policy unless the current policy is already optimal.

    Fix: Interpret the absence of a strictly better policy as the optimality condition.

  • Thinking that policy evaluation and policy improvement are the same operation.

    Evaluation supplies value information; improvement uses that information to change the policy.

    Fix: Keep the stages distinct: evaluate first, then improve.

  • Assuming a new policy evaluation must start from an unrelated value function.

    The previous value function can provide a useful starting point and typically makes the next evaluation converge much faster.

    Fix: Reuse the previous value function as the starting information for the new evaluation.

  • Explaining termination without mentioning finiteness.

    The stated termination guarantee depends on having finitely many possible policies.

    Fix: Connect strict improvement with the finite policy space: infinite strict progress is impossible.

MEDIUM

A described reinforcement learning problem has multiple states. Its current policy is evaluated, the resulting value information is used to produce a better policy, and the process repeats. Identify the problem formulation and name the two alternating stages.

Hints
  • Multiple states identify the general finite Markov decision process formulation.
  • The two stages are policy evaluation and policy improvement.

Key Takeaways

  1. Policy iteration alternates between evaluating the current policy and improving it.
  2. Policy improvement produces a strictly better policy unless the current policy is already optimal.
  3. A finite set of possible policies makes infinite strict progress impossible, so policy iteration reaches an optimal policy after finitely many iterations.
  4. Reusing the previous value function typically speeds up the next iterative policy evaluation.
  5. Bandit problems have one state; finite Markov decision processes provide the general formulation for multiple-state reinforcement learning problems.
  6. Value functions and Bellman equations are central ideas associated with finite Markov decision processes.

Key Takeaways

  • Policy iteration searches for an optimal policy through repeated evaluation and improvement.
  • Strict policy improvement continues until the current policy is optimal.
  • Finiteness guarantees termination because only finitely many policies are available.
  • The previous value function can be reused to accelerate the next policy evaluation.
  • A bandit is the one-state special case, while a finite Markov decision process is the general multiple-state formulation.