The off-policy actor critic improves the sample efficiency of ๐ญ Actor-Critic by accepting off-policy data (from a replay buffer), rather than just the current policy's rollouts. To work with off-policy samples, we need two changes:
- The original value target
is incorrect since this estimate would be measuring the value of based on the action taken by another policy, not the current one. - Our gradient step
is using the action taken by another policy, not the one our current policy would've chosen.
Value Estimation
To address the first problem, we can instead estimate the Q-function
which has no requirement that
where we keep in mind that the next step's action
Action Sampling
For the second issue, we'll sample
Note the distinction between the action used to update our Q-value estimate and the action used to update our policy; the former can use any action, while the latter must come from the current policy.
In practice, since computing advantage requires some estimate of the state-value, we use the Q-function directly instead,
Though this would increase our variance by getting rid of the baseline, we can make up for this by simply sampling
Direct Differentiation
One last observation is that after these changes, the policy gradient is now estimating
and since we're now learning
which gives us the gradient