5.2.9 · D3Deep & Advanced RL

Worked examples — Proximal Policy Optimization (PPO)

3,359 words15 min readBack to topic

The objective we evaluate every time

Two words we will use constantly:

  • "Gradient flows" = this sample is still teaching the policy to change.
  • "Gradient stopped" = this sample has been silenced; PPO has decided we've moved far enough for this action.

The scenario matrix

The behaviour depends on two things only: the sign of , and where sits relative to the band edges and . That gives a small grid. The last rows are the special/real-world cases.

Cell Sign of Ratio Which branch wins Gradient? Meaning
A (good) inside band either (equal) flows normal policy gradient
B (good) above band () clipped stopped "good enough, stop boosting"
C (good) below band () unclipped flows undoing an over-cut of a good action
D (bad) inside band either (equal) flows normal suppression
E (bad) below band () clipped stopped "suppressed enough, stop"
F (bad) above band () unclipped flows undoing accidental boost of a bad action
G anywhere tie (both zero) none average action → no learning signal
H (edge) either exactly on boundary undefined at kink; 0 on clipped side, on unclipped side limiting behaviour (both edges)
I (word) real task trading-bot decision
J (exam twist) mixed batch which samples are "dead"?
Figure — Proximal Policy Optimization (PPO)

Worked examples











Recall Fast decision procedure

Given and , is the sample dead? Dead only if: ( and ) or ( and ). ::: In all other cases the gradient flows.


Active recall