All problems
PBT Explore-Exploit Decisions
Problem
Decide the population-based training action for every member.
Return -1 when the score is below bottom_q (copy from a better member), 1 when it is above top_q (keep and perturb), and 0 otherwise.
Hint
The quantile thresholds are strict: scores exactly on a boundary are kept.
Test cases
case 1
in: [[1,5,10],2,8]
expected: [-1,0,1]
case 2
in: [[5,5],2,8]
expected: [0,0]
case 3
in: [[],1,2]
expected: []
Starter codePython
def pbt_decisions(scores, bottom_q, top_q):
# Your code here
pass3 test cases · run your code against them in the editor