Skip to content
DeepForgeby svx
All problems

Rollout Average Return

Problem

Return the average return across a batch of rollout returns. An empty batch returns 0.0.

Hint

This is the plain Monte Carlo estimate of the policy's expected return.

Test cases

case 1
in: [[1,2,3]]
expected: 2
case 2
in: [[]]
expected: 0
case 3
in: [[5]]
expected: 5
case 4
in: [[-1,1]]
expected: 0
Starter codePython
def rollout_average_return(returns):
    # Your code here
    pass

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