AI & ML Atlas
Reinforcement LearningalgorithmAnimated walkthrough
Deterministic Policy Gradient (DPG)
The policy-gradient theorem for policies that output a single action.
The idea
For a deterministic policy μθ(s), the gradient of expected return is the gradient of Q with respect to the action times the gradient of the policy: you improve the policy by moving its action in the direction the critic says is better. It is much more sample-efficient than stochastic policy gradients in continuous action spaces.
∇θ J = E[∇θ μθ(s) ∇ₐ Q(s,a)|ₐ₌μθ(s)]
Watch it run
The pipeline lights up one step at a time. Use the controls to pause or step through it.
- 1Learn a critic Q(s, a).
- 2For each state compute ∇ₐ Q(s, a) at a = μ(s).
- 3Chain it with ∇θ μ(s).
- 4Update θ along this gradient.
∇θ J = E[∇θ μθ(s) ∇ₐ Q(s,a)|ₐ₌μθ(s)]
1/4
Step by step
- 1Learn a critic Q(s, a).
- 2For each state compute ∇ₐ Q(s, a) at a = μ(s).
- 3Chain it with ∇θ μ(s).
- 4Update θ along this gradient.
Where it is used
Theory behind DDPG and TD3.
Watch out for
Needs off-policy exploration noise because the policy itself is deterministic.