AI & ML Atlas
Reinforcement LearningalgorithmAnimated walkthrough
Trust Region Policy Optimisation (TRPO)
Improves the policy while keeping it within a KL-divergence "trust region" of the old one.
The idea
A large policy-gradient step can wreck performance. TRPO maximises a surrogate improvement subject to a hard constraint that the KL divergence between old and new policies stays below δ. It solves this with a natural-gradient step (conjugate gradient) followed by a line search, giving monotonic improvement in theory.
maximise E[(π_new/π_old)·A] subject to KL(π_old ‖ π_new) ≤ δ
Watch it run
The pipeline lights up one step at a time. Use the controls to pause or step through it.
- 1Collect data and compute advantages.
- 2Form the surrogate objective and the KL constraint.
- 3Find the step with conjugate gradient using Fisher-vector products.
- 4Line-search to satisfy the KL limit and improve the objective.
maximise E[(π_new/π_old)·A] subject to KL(π_old ‖ π_new) ≤ δ
1/4
Step by step
- 1Collect data and compute advantages.
- 2Form the surrogate objective and the KL constraint.
- 3Find the step with conjugate gradient using Fisher-vector products.
- 4Line-search to satisfy the KL limit and improve the objective.
Where it is used
Stable policy optimisation; the ancestor of PPO.
Watch out for
Complicated and expensive per update, which is why PPO replaced it.