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

Lesson 70

TD3

Stabilize DDPG with two critics, a delayed actor, and noise on the target action. This lesson includes one worked example.

Intermediate12 min
TD3 MahiDev

What You Will Learn

  • Idea
  • Example
  • When to use it

Idea

Twin Delayed DDPG trains two critics and builds the target from the smaller score. An overestimated critic loses the vote. The actor is updated less often than the critics, and the target action is jittered so the critic cannot exploit a sharp spike.

Example

python
q1, q2 = 1.4, 0.9
target = min(q1, q2)
print(f"td3 target: {target:.2f}")

Output:

text
td3 target: 0.90

When to use it

  • Prefer TD3 over DDPG when Q values climb and the behavior does not improve.
  • The target is the smaller of the two critic scores, here 0.9 rather than 1.4.
  • Delaying the actor gives the critics time to catch up before the policy moves.

Loading playground…