Experience Replay stores transitions in a buffer and samples minibatches for training, breaking correlation in the data stream and enabling off-policy learning.
Online learning from a stream of correlated transitions (consecutive transitions from the same episode are similar) leads to instability and poor generalization. Replay breaks temporal correlation by shuffling experience.
Implement experience_replay_buffer(capacity) class with:
add(s, a, r, s', done) to store transitionssample(batch_size) to return random minibatch__len__ for current sizeNo results yet
Run your code to check it against the examples, or submit to run every test.