Actor-Critic combines policy gradient (actor) with value estimation (critic). The critic provides low-variance TD estimates to reduce policy gradient variance.
The problem, from first principles
Policy gradients have high variance (return G_t varies a lot). TD critic provides estimate V(s) which reduces variance: use advantage A(s,a) = r + γV(s') - V(s) instead of full return.
Hint 1: Compute advantage
A(s,a) = r + γV(s') - V(s)
Hint 2: Actor loss
Loss = -log π(a|s) * A(s,a) (negative advantage means we regret the action)
Hint 3: Critic loss
MSE of value prediction against bootstrapped target
Keywords
rlactor-criticpolicy-gradienttemporal-difference
Python
Run your code to see results
No results yet
Run your code to check it against the examples, or submit to run every test.