Skip to main content
MahiDev — Learn. Build. Become AI-ready.

Lesson 69

DDPG

Learn a deterministic action for continuous control, and score that action with a critic. This page has one worked example.

Intermediate12 min
DDPG MahiDev

What You Will Learn

  • Idea
  • Example
  • When to use it

Idea

Deep Deterministic Policy Gradient is actor-critic for continuous actions. The actor outputs one action, such as a throttle, instead of a probability over discrete moves. The critic scores that state and action. The actor changes the action in the direction that raises the critic's score.

Example

python
action = 0.6
critic = 1.2 + 0.5 * action
print(f"critic score: {critic:.2f}")

Output:

text
critic score: 1.50

When to use it

  • Use it when the action is a real number or a vector, not a menu of buttons.
  • Exploration is added as noise on the action. The actor itself stays deterministic.
  • The critic can overestimate. TD3 is the usual correction.

Loading playground…