Skip to content
DeepForgeby svx
All problems

Replay Buffer Warmup

Problem

Count how many full batches the replay buffer can already provide: buffer_size - batch_size + 1, floored at 0. A non-positive batch size returns 0.

Hint

Learning usually starts only after the buffer holds at least one full batch.

Test cases

case 1
in: [100,32]
expected: 69
case 2
in: [10,32]
expected: 0
case 3
in: [32,32]
expected: 1
case 4
in: [50,0]
expected: 0
Starter codePython
def replay_buffer_warmup(buffer_size, batch_size):
    # Your code here
    pass

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