All problems
Update-To-Data Ratio
Problem
Check whether the update-to-data ratio matches a target: |gradient_steps / new_samples - target_utd| <= tol. A non-positive sample count returns False.
Hint
UTD above 1 means the critic is updated more than once per new transition.
Test cases
case 1
in: [20,10,2,1e-9]
expected: true
case 2
in: [20,10,3,1e-9]
expected: false
case 3
in: [5,0,1,1e-9]
expected: false
Starter codePython
def utd_ratio_check(gradient_steps, new_samples, target_utd, tol):
# Your code here
pass3 test cases · run your code against them in the editor