Concepts / Policy Improvement Theorem

Policy Improvement Theorem

Greedy policy construction means selecting maximum-valued actions according to v π.

  • Programming

From Evaluation to Improvement

Policy improvement starts with an original policy and its value function, written as vπ. The value function provides the basis for comparing possible actions. The goal is to create a new policy that chooses the action that looks best according to that value function.

A policy that chooses maximum-valued actions according to vπ is called greedy with respect to the original policy's value function.

Building the Greedy Policy

To construct a greedy policy, examine each decision state separately. For that state, use the original policy's value function as the basis for a one-step comparison of the available actions. Select an action with the greatest resulting value. Repeating this choice at every state produces a new policy, called a greedy policy with respect to vπ.

supplies comparison basislists choices atselect maximumvπoriginal policy valuefunctionstatedecision pointmaximum-valued actiongreedy choiceavailable actionsone-step comparisons
How does the original policy's value function determine which action the greedy policy selects at a state?

The One-Step Lookahead

The comparison is described as a one-step lookahead because each candidate action is evaluated by looking at what happens immediately after taking it. The evaluation considers the current state, the candidate action, the immediate reward, and the value associated with the next state. These comparisons provide the action values used to decide which action is greedy.

considerproducesleads towardcontributescontributescurrent statecandidate actionimmediate rewardaction valueused for comparisonnext-state valueaccording to vπ
How does a one-step lookahead compare a candidate action using the immediate result and the next state's value?

The important point is that the original value function supplies the comparison basis. The greedy policy is not chosen by looking only at the action's immediate result; the one-step comparison also uses the value associated with what follows.

Choosing Among Action Values

Selecting a Greedy Action

At one state, the available actions have action values: left = 4, right = 7, and wait = 5. Which action can the greedy policy choose?

Compare: Compare the action values for all available actions at the state.

Find the maximum: The greatest value is 7, associated with right.

Construct the choice: The greedy policy chooses right at this state.

The greedy choice is right because it has the maximum action value.

permitted maximumpermitted maximumnot maximumleftvalue 7greedy choiceleft or rightrightvalue 7waitvalue 4
When multiple actions have the same maximum action value, which actions may the greedy policy choose?

If two or more actions share the maximum value, the tie may be broken arbitrarily. Therefore, if left and right both have the maximum action value, either one may be selected as the greedy action.

Why Improvement Is Guaranteed

The policy improvement theorem connects the local greedy choice to a global guarantee about the new policy. When the new policy is constructed by choosing maximum-valued actions according to vπ, it meets the conditions of the theorem. The resulting policy is guaranteed to be as good as or better than the original policy.

supply vπchoose maximum-valued actionstheorem appliesoriginal policyπ with vπone-step comparisonbased on vπgreedy policyπ′equal or betterthan the original policy
What sequence of comparisons connects a greedy action choice under vπ to an equal-or-better policy?

Common Construction Mistakes

  • Choosing an action without comparing it with the other available actions.

    Greedy construction requires selecting an action with the maximum value according to the comparison.

    Fix: Compare all available action values at the state before choosing.

  • Treating the original policy and the greedy policy as the same policy.

    The original policy supplies vπ, while the new policy is constructed from maximum-valued actions according to that value function.

    Fix: Keep the original policy as the source of the value function and construct the greedy policy separately.

  • Rejecting a greedy policy because it breaks a tie differently.

    Ties between maximum-valued actions may be broken arbitrarily.

    Fix: Accept any tied maximum-valued action as a valid greedy choice.

  • Interpreting the theorem as requiring strict improvement.

    The guarantee is that the new policy is as good as or better than the original policy.

    Fix: Allow both equal performance and improved performance under the theorem's guarantee.

Practice Check

EASY

At a state, three actions have values: inspect = 6, move = 6, and stop = 3. Construct one valid greedy choice and explain why another choice is not required.

Hints
  • Identify every action with the maximum value.
  • A tie between maximum-valued actions may be broken arbitrarily.
  • The lower-valued action is not a maximum-valued choice.

What do you think happens?

Which actions can a greedy policy choose when inspect and move both have value 6, while stop has value 3?

  • inspect only
  • move only
  • inspect or move
  • stop only
Reveal answer

Answer: inspect or move

Both inspect and move have the maximum value, so the tie may be broken arbitrarily. Stop is not a maximum-valued action.

Key Takeaways

  1. Policy improvement begins with an original policy and its value function vπ.
  2. A greedy policy chooses maximum-valued actions according to one-step comparisons based on vπ.
  3. The one-step lookahead considers the current state, candidate action, immediate reward, and next-state value.
  4. Ties among maximum-valued actions may be broken arbitrarily.
  5. The policy improvement theorem guarantees that the greedy policy is as good as or better than the original policy.

Key Takeaways

  • A greedy policy is constructed from the original policy's value function vπ.
  • At each state, one-step comparisons identify an action with the maximum value.
  • Any tied maximum-valued action may be selected.
  • The policy improvement theorem guarantees an equal-or-better result compared with the original policy.