Reinforcement Learning Lab

Eight reinforcement-learning labs: classical, deep, policy optimisation, bandits, planning and multi-agent, with experiments trained for real in your browser.

39interactive experiments

TRPO and continuous actions

Policy Optimization · policy

Learning objectives

  • Understand the KL constraint.
  • Know how continuous actions are represented.

The idea

TRPO maximises a surrogate objective under the constraint that the mean KL between the old and new policy does not exceed δ.

Explanation

It is solved with conjugate gradient and a line search. For continuous actions the policy is usually a Gaussian with a network-produced mean and a learned standard deviation, and the action is clipped to the environment limits.

Equations

\max_\theta\ \mathbb{E}\Big[\tfrac{\pi_\theta(a|s)}{\pi_{old}(a|s)}\hat A\Big]\quad\text{s.t.}\quad\mathbb{E}\big[D_{KL}(\pi_{old}\Vert\pi_\theta)\big]\le\delta

δ is typically 0.01.

Worked example

"Watching KL in TRPO" shows the KL of every update and checks it stays within the limit.

Common mistakes

Confusing TRPO with PPO (PPO does not enforce KL explicitly).

Summary

TRPO explicitly constrains KL; Gaussian policies handle continuous actions.

Related experiments

Assessment questions

References

  1. Schulman, J.; Levine, S.; Abbeel, P.; et al. (2015). Trust region policy optimization. ICML 2015. Link
  2. Schulman, J.; Wolski, F.; Dhariwal, P.; et al. (2017). Proximal policy optimization algorithms. arXiv. Link