Skip to content
DeepForgeby svx
All problems

Deadly Triad Example Check Lite

Problem

Count how many conditions of the deadly triad are present: function approximation, bootstrapping, and off-policy learning. The instability risk is highest when all three are true.

Hint

Tabular on-policy methods avoid the triad entirely.

Test cases

case 1
in: [true,true,true]
expected: 3
case 2
in: [true,false,true]
expected: 2
case 3
in: [false,false,false]
expected: 0
case 4
in: [true,true,false]
expected: 2
Starter codePython
def deadly_triad_count(function_approx, bootstrapping, off_policy):
    # Your code here
    pass

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