Value Iteration
The central idea is mutual correction: the value function becomes more accurate for the current policy, and the policy becomes better with respect to the current value function.
Two Processes in Feedback
Value iteration is best understood through generalized policy iteration, or GPI. GPI is not one fixed algorithm. It is a feedback relationship between two processes: policy evaluation improves the value function for the current policy, while policy improvement changes the policy using the current value function.
The central idea is mutual correction: the value function becomes more accurate for the current policy, and the policy becomes better with respect to the current value function.
Evaluation Versus Improvement
During policy evaluation, the policy is treated as the current policy and the value function is updated so that it better reflects that policy. The policy itself is not the object being improved during this process.
During policy improvement, the current value function is used to change the policy. The new policy becomes greedy with respect to that value function. In this process, the policy changes because the value function provides the basis for selecting better behavior.
| Process | Uses | Primary change |
|---|---|---|
| Policy evaluation | The current policy | The value function |
| Policy improvement | The current value function | The policy |
Evaluation changes the assessment of the current policy; improvement changes the policy using that assessment.
Separating the Two Changes
An agent has a current policy and a value function that estimates how well that policy performs. Identify the change made by each process.
- 1Evaluation
Keep the current policy and update the value function so that it better represents the policy.
- 2Improvement
Keep the current value function as the basis for comparison and change the policy to be greedy with respect to it.
- 3Interaction
Use the improved policy as the current policy for another evaluation process.
Evaluation changes the value function; improvement changes the policy. GPI is their continuing interaction.
Scheduling the Interaction
Different reinforcement learning methods can implement the same two broad processes with different schedules and levels of granularity. The distinction is not whether evaluation and improvement exist, but how much of one process occurs before the other resumes.
- Policy iteration alternates the processes: one process completes before the other begins.
- Value iteration performs only a single iteration of policy evaluation between policy improvements.
- Asynchronous dynamic programming can interleave the processes at an even finer level, including updating one state in one process before returning to the other.
This makes value iteration a middle point in the scheduling picture. It does not wait for a complete policy evaluation before improving the policy. Instead, it uses a limited amount of evaluation before the next improvement. Asynchronous methods make the schedule still more fine-grained.
GPI is a framework for understanding the relationship. Policy iteration, value iteration, and asynchronous dynamic programming are different ways of scheduling the relationship.
When Both Processes Stabilize
The stopping idea for GPI is stabilization. If policy evaluation stops producing changes, the value function is consistent with the policy. If policy improvement also stops producing changes, the policy is no longer improved with respect to that value function.
When both conditions hold, the value function and policy are optimal. The value function is consistent with the policy, and the policy cannot be improved using that value function. Stability therefore connects the two local stopping conditions to the global conclusion of optimality.
Asynchronous State Updates
A full value-iteration sweep suggests updating every state before beginning the next round. Asynchronous value iteration uses a different update pattern: at each step, it selects one state and applies the value iteration backup to that state only. The update is made in place, and the selected state may change from step to step.
The convergence guarantee is about coverage, not synchronization. In the discounted setting, states do not need to be selected equally often, and they do not need to be updated in a coordinated sweep. The required condition is that no state is permanently left out.
Reading an Asynchronous Selection Sequence
Suppose an asynchronous procedure selects states in the order A, C, B, A, B, C, and continues indefinitely. What property should you check for the discounted convergence guarantee?
- 1Inspect coverage
Check whether every state appears in the selected-state sequence.
- 2Ignore equal frequency
The guarantee does not require every state to be selected equally often.
- 3Check indefinite recurrence
For the stated guarantee, every state must occur infinitely often.
The important property is infinite occurrence of every state, not a synchronized sweep or equal selection frequency.
Discounted Convergence
For asynchronous value iteration, the stated asymptotic convergence guarantee has two conditions. The discount parameter must satisfy 0 ≤ γ < 1, and every state must occur in the selected-state sequence infinitely many times.
When both conditions hold, asynchronous value iteration converges asymptotically to the optimal value function v*. A stochastic state-selection sequence can satisfy the requirement if it continues to include every state.
Why Backup Order Matters
Asynchronous updates are made in place. Therefore, a later backup can use a value that was updated earlier in the same sequence. Changing the order changes which newly updated values are available to later backups.
This ordering effect is especially important in the undiscounted episodic case. Some backup orderings may fail to converge there. Consequently, the sequence of backups is not merely an implementation detail in every setting; it can affect whether convergence occurs.
Common mistake Assuming asynchronous updates are equivalent to a full sweep.
What it looks likeTreating a sequence that updates A, then B, then C as though all three updates happened simultaneously.
Why it failsIn-place asynchronous updates allow later backups to use values produced by earlier backups.
Do this insteadTrack the selected state and remember that the order determines which updated values are available.
Common mistake Assuming any backup order converges in every setting.
What it looks likeApplying the discounted convergence guarantee directly to the undiscounted episodic case.
Why it failsSome backup orderings may fail to converge in the undiscounted episodic case.
Do this insteadTreat the discounted guarantee and the undiscounted episodic case as distinct situations.
Mixed Backup Strategies
Asynchronous dynamic programming does not have to use only one kind of backup. Policy evaluation backups and value iteration backups can be interspersed, allowing information to propagate through the state values while the two GPI processes are interleaved.
This procedure is described as a kind of asynchronous truncated policy iteration. The important point is that evaluation-style and value-iteration-style backups need not be separated into large, completed phases. They can be mixed at a fine-grained level.
Practice and Diagnosis
A method updates one selected state at a time. Its discount parameter satisfies 0 ≤ γ < 1. The state-selection sequence includes some states repeatedly but permanently excludes one state. Does the stated asymptotic convergence guarantee apply? Explain why.
Hints
- Check both parts of the discounted convergence condition.
- Ask whether every state occurs infinitely often.
A value function changes while the policy is held fixed. Then the policy changes using the current value function. Identify which step is evaluation and which step is improvement, and explain why.
Hints
- Evaluation updates the value function for the current policy.
- Improvement updates the policy using the current value function.
Consider an undiscounted episodic setting in which two asynchronous backup orders are possible. Why should you avoid assuming that both orders have the same convergence behavior?
Hints
- Asynchronous backups are made in place.
- The source notes that some backup orderings may fail to converge in the undiscounted episodic case.
Key Takeaways
- 1Generalized policy iteration is the interaction between policy evaluation and policy improvement, not one fixed algorithm.
- 2Evaluation updates the value function for the current policy; improvement updates the policy using the current value function.
- 3Policy iteration, value iteration, and asynchronous dynamic programming differ in how finely they schedule and interleave these processes.
- 4Asynchronous value iteration updates one selected state at a time, and discounted convergence requires every state to be selected infinitely often when 0 ≤ γ < 1.
- 5In-place backup order matters, especially in the undiscounted episodic case, and evaluation backups can be interspersed with value-iteration backups.
At a glance
- GPI describes a feedback relationship between improving a value function and improving a policy.
- Policy evaluation changes values, while policy improvement changes the policy.
- Value iteration and asynchronous dynamic programming use progressively finer interleavings of these processes.
- For 0 ≤ γ < 1, asynchronous value iteration has the stated asymptotic guarantee when every state is selected infinitely often.
- In-place backup order can affect behavior, and some orderings may fail to converge in the undiscounted episodic case.