All problems
Target Policy Noise Clip
Problem
Clip target policy noise to the interval [-clip_range, clip_range].
Hint
Bounding the noise keeps the smoothed target close to the true target action.
Test cases
case 1
in: [0.2,0.5]
expected: 0.2
case 2
in: [0.8,0.5]
expected: 0.5
case 3
in: [-0.8,0.5]
expected: -0.5
Starter codePython
def clip_target_noise(noise, clip_range):
# Your code here
pass3 test cases · run your code against them in the editor