PPO (Schulman et al., 2017) reuses each batch of experience for several updates. To do that correctly, each sample is reweighted by how much more or less likely the current policy is to take its action than the policy that collected it.
Implement probability_ratio(logp_new, logp_old), returning exp(logp_new - logp_old).
Subtract the log-probabilities, then take exp.
No results yet
Run your code to check it against the examples, or submit to run every test.