Skip to content
DeepForgeby svx
All problems

CFR Regret Update

Problem

Apply one counterfactual regret minimization update.

The expected utility is strategy . utilities; add utilities[a] - expected_utility to regrets[a]. Return the new regret list.

Hint

Regret is the gain over the strategy's own expected utility.

Test cases

case 1
in: [[0,0],[0.5,0.5],[1,0]]
expected: [0.5,-0.5]
case 2
in: [[1,2],[0.25,0.75],[0,4]]
expected: [-2,3]
case 3
in: [[0],[1],[3]]
expected: [0]
Starter codePython
def cfr_regret_update(regrets, strategy, utilities):
    # Your code here
    pass

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