MultiAgentLearning / playground

PlayGround: AI Research into Multi-Agent Learning.
https://www.pommerman.com
Apache License 2.0
765 stars 217 forks source link

bugs in SimpleAgent #192

Closed BrainWWW closed 5 years ago

BrainWWW commented 5 years ago
return agent.act(obs, action_space=spaces.Discrete(6))
  File "E:\anaconda\lib\site-packages\pommerman\agents\simple_agent.py", line 78, in act
    if self._maybe_bomb(ammo, blast_strength, items, dist, my_position):
  File "E:\anaconda\lib\site-packages\pommerman\agents\simple_agent.py", line 345, in _maybe_bomb
    for position in items.get(constants.Item.Passage):
TypeError: 'NoneType' object is not iterable

what caused it?no ‘Passage’ in items?

cinjon commented 5 years ago

Can you clarify this further? I am not sure what you are asking.

pauljasek commented 5 years ago

This still needs to be fixed. The line for position in items.get(constants.Item.Passage): should be changed to for position in items.get(constants.Item.Passage, []):