The policy-gradient update raises the log-probability of actions that had positive advantage. Minimizing the negative of logp times advantage does exactly that when used with an optimizer.
Implement policy_gradient_loss(logp, adv), returning the negated mean of logp * adv.
Multiply, average, negate.
No results yet
Run your code to check it against the examples, or submit to run every test.