Skip to content
DeepForgeby svx
All problems

RND Normalized Bonus

Problem

Normalize RND prediction errors into a bonus by z-scoring them.

Return (e - mean) / std using population statistics; if the standard deviation is zero return zeros, and an empty batch returns [].

Hint

Normalizing novelty across a batch keeps the intrinsic reward scale stable.

Test cases

case 1
in: [[1,2,3]]
expected: [-1.224744871391589,0,1.224744871391589]
case 2
in: [[5,5]]
expected: [0,0]
case 3
in: [[]]
expected: []
case 4
in: [[-1,0,1]]
expected: [-1.224744871391589,0,1.224744871391589]
Starter codePython
import math
def rnd_normalized_bonus(errors):
    # Your code here
    pass

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