All problems
Curriculum Goal Sampling
Problem
Interpolate the goal distance for a curriculum level linearly from min_dist at level 0 to max_dist at max_level. A non-positive max_level returns max_dist.
Hint
Goal distance grows with the curriculum level so tasks get harder gradually.
Test cases
case 1
in: [0,10,1,11]
expected: 1
case 2
in: [10,10,1,11]
expected: 11
case 3
in: [5,10,1,11]
expected: 6
case 4
in: [0,0,1,11]
expected: 11
Starter codePython
def curriculum_goal_distance(level, max_level, min_dist, max_dist):
# Your code here
pass4 test cases · run your code against them in the editor