Lab · c23.s06.L1
Policy-gradient variance
Subtracting a baseline leaves the average policy-gradient update unchanged, because the score averages to zero, and it shrinks the update's spread most when the baseline equals the policy's own average reward.
Question: How do you improve a policy without knowing the world?
Frame 1 of 1: No baseline (b = 0.00)Without a baseline the 200 one-episode updates spread with standard deviation 0.320 and variance 0.102 around the mean update 0.150. They are wide because a win pays the full reward. Subtracting the policy's own average reward, 0.50, leaves this mean where it is and shrinks the spread.
No baseline (b = 0.00). Without a baseline the 200 one-episode updates spread with standard deviation 0.320 and variance 0.102 around the mean update 0.150. They are wide because a win pays the full reward. Subtracting the policy's own average reward, 0.50, leaves this mean where it is and shrinks the spread.
Keyboard: Space plays or pauses, Left and Right step, Home goes to the first frame, End goes to the last frame.
Text description of this lab
Two hundred dots per strip share an axis from −0.6 to 0.6. Grey hollow dots show one-episode gradient estimates with no baseline; navy filled dots show the same episodes at the chosen baseline. Both centre on the same mean update, which no baseline changes, and the navy strip narrows as the baseline nears the policy's average reward: 0.50 at p₁ = 0.80, 0.55 at p₁ = 0.90. A U-shaped variance curve below bottoms there, marked with a gold diamond.
Return to the section that hosts this lab
Caption status: synthetic. Every lab declares one of published, re-simulated, schematic, synthetic or interpolated.