'Get batch of episodes to train on.'

def get_batch(self, n):

    p = self.sampling_distribution()
    idxs = np.random.choice(self.cur_size, size=n, replace=False, p=p)
    self.last_batch = idxs
    return ([self.buffer[idx] for idx in idxs], p[idxs])
