All problems
Rainbow Coverage Count
Problem
Count how many canonical Rainbow components appear in a configuration list.
The canonical set is double_q, dueling, prioritized, n_step, distributional, and noisy. Return the number of canonical names present in components, ignoring duplicates and unknown names.
Hint
Rainbow is the union of six orthogonal DQN improvements.
Test cases
case 1
in: [["double_q","dueling","prioritized","n_step","distributional","noisy"]]
expected: 6
case 2
in: [["dueling"]]
expected: 1
case 3
in: [[]]
expected: 0
case 4
in: [["double_q","double_q","unknown"]]
expected: 1
Starter codePython
def rainbow_coverage_count(components):
# Your code here
pass4 test cases · run your code against them in the editor