Skip to content
DeepForgeby svx
All problems

DDPG Critic Target Compute

Problem

Compute the DDPG critic target: reward + gamma * target_q_next * (1 - done). A done flag removes the bootstrap term.

Hint

The target policy, not the behavior policy, produces the next action.

Test cases

case 1
in: [1,false,0.9,2]
expected: 2.8
case 2
in: [1,true,0.9,2]
expected: 1
case 3
in: [0,false,0.5,-2]
expected: -1
Starter codePython
def ddpg_critic_target(reward, done, gamma, target_q_next):
    # Your code here
    pass

3 test cases · run your code against them in the editor