Conversation
The error 'TypeError: Population must be a sequence or set. For dicts, use list(d)' sometimes occurred
|
Can you describe your environment? |
|
Sure,
|
|
It looks like this: |
|
Big thanks for your report. Can you provide the parameter you are using? e.g. |
|
I just followed 'How to reproduce?'. So have exactly this same parameters as you wrote. But I have some problems, most of a time the bird is going up and can't go through pipes. That might be related. |
That's normal. You should leave it run in the background and check it tomorrow 😈
No, I don't think so. There may be something worng when the system switch from OBSERVE state to EXPLORE state since you crashed at TIMESTEP 10001. |
|
Tomorrow? Okey:balloon: |
|
Nice! So I think we find the problem. BTW, why the bird keeps going up and can't go through the pipes is because it still got high probability to choose a random action. And since the FPS of the game is 30, i.e. agent can make an action every 0.03s, it has a high probability to choose jump, which results in what you observed. However, after some epochs of training, it will keep sampling those bad memories to fix its behavior. And when the ϵ finally anneals down to some relatively low value, agent will start to follow the policy it learned. (no more random action!) At that time, you can see the bird flying like a ninja. Hope this helps! 🍻 |
|
Hey @szymonk92 , how's it going? |
|
Any updates? @szymonk92 |
|
It's fine, but I had to add list(D) to make it work. |
|
@yenchenlin For python versions below 3.5, I would suggest put |
|
I had the same issue in python 3.4; when explore mode transitioned to observe there was a bug. By making deque, D a list the issue was fixed. |
The error 'TypeError: Population must be a sequence or set. For dicts, use list(d)' sometimes occurred, so I made this small fix for next users who might play with it.