Took away explicit deleting since the next_state variable gets used in another slot

This commit is contained in:
Brandon Rozek 2019-02-14 22:01:13 -05:00
parent 2caf869fd6
commit 736e73a1f7

View file

@ -15,8 +15,6 @@ class ReplayMemory(object):
"""Saves a transition."""
if len(self.memory) < self.capacity:
self.memory.append(None)
if self.memory[self.position] is not None:
del self.memory[self.position]
self.memory[self.position] = Transition(*args)
self.position = (self.position + 1) % self.capacity