seungeunrho/minimalRL

Use maxlen in deque initializer

jwergieluk opened this issue · 1 comments

In the ReplayBuffer implementation, you can use

self.buffer = collections.deque(maxlen=buffer_limit)

to simplify the put() method -- deque will automatically drop the oldest elements.
Keep up the amazing work!

Thanks. I guess the code will be more brief with your suggestion.
I will update soon!