All problems
Time-Limit Truncation
Problem
Decide how to bootstrap at an episode boundary.
Return [bootstrap_flag, terminal_flag], where the episode is terminal only when done is true and truncated is false; otherwise bootstrapping is allowed.
Hint
A time-limit truncation is not a true terminal state, so the value must bootstrap.
Test cases
case 1
in: [true,false]
expected: [0,true]
case 2
in: [true,true]
expected: [1,false]
case 3
in: [false,false]
expected: [1,false]
case 4
in: [false,true]
expected: [1,false]
Starter codePython
def time_limit_truncation_bootstrap(done, truncated):
# Your code here
pass4 test cases · run your code against them in the editor