rlcode / reinforcement-learning

Minimal and Clean Reinforcement Learning Examples
MIT License
3.37k stars 728 forks source link

sampling from deque #29

Closed slakkur1 closed 7 years ago

slakkur1 commented 7 years ago

Great stuff! This has been extremely helpful! My only suggestion would be in line 78, changing _mini_batch = random.sample(self.memory, batchsize) to _mini_batch = random.sample(list(self.memory), batchsize), otherwise you get the following error, "TypeError: Population must be a sequence or set. For dicts, use list(d)."

keon commented 7 years ago

@slakkur1 Thanks for your feedback! Which code are you referring to? It has been working fine on my computer 😉 . Do you have a sample code to recreate the error?