Let denote the probability ratio , so . TRPO maximizes a “surrogate” objective

The superscript CPI refers to conservative policy iteration. Without a constraint, maximization of would lead to an excessively large policy update; hence, we now consider how to modify the objective, to penalize changes to the policy that move away from 1. The main objective proposed is the following:

where is a hyperparameter. The motivation for this objective is as follows. The first term inside the min is . The second term, , modifies the surrogate objective by clipping the probability ratio, which removes the incentive for moving outside of the interval . Finally, we take the minimum of the clipped and unclipped objective, so the final objective is a lower bound (i.e., a pessimistic bound) on the unclipped objective. With this scheme, we only ignore the change in probability ratio when it would make the objective improve, and we include it when it makes the objective worse.

Using a truncated version of generalized advantage estimation(GAE), the advantage estimator is:

where is the TD residual.

Readme