All problems
Uncertainty Penalty Coefficient
Problem
Penalize optimistic Q values by uncertainty: return mean_q[a] - beta * std_q[a] for each action.
Hint
Subtracting beta times the standard deviation yields pessimistic value estimates.
Test cases
case 1
in: [[5,4],[1,2],0.5]
expected: [4.5,3]
case 2
in: [[0],[3],1]
expected: [-3]
case 3
in: [[1,2],[0,0],2]
expected: [1,2]
Starter codePython
def uncertainty_penalty(mean_q, std_q, beta):
# Your code here
pass3 test cases · run your code against them in the editor