from pommerman.agents import BaseAgent
from pommerman.agents.simple_agent import SimpleAgent
class Agent(BaseAgent):
def __init__(self):
BaseAgent.__init__(self)
self.simple = SimpleAgent()
def act(self, obs, action_space):
action = self.simple.act(obs, action_space)
return [action, 0, 0]
Then using the radio scenario and the game loop provided in the docs with 4 of these agents, when one dies an error is thrown by the environment:
Traceback (most recent call last):
File "C:/Users/James/PycharmProjects/pommerman/Game.py", line 67, in
main()
File "C:/Users/James/PycharmProjects/pommerman/Game.py", line 47, in main
state, reward, done, info = env.step(actions)
File "C:\Users\James\AppData\Local\Programs\Python\Python36\lib\site-packages\pommerman\envs\v2.py", line 85, in step
personal_actions = [action[0] for action in actions]
File "C:\Users\James\AppData\Local\Programs\Python\Python36\lib\site-packages\pommerman\envs\v2.py", line 85, in
personal_actions = [action[0] for action in actions]
TypeError: 'int' object is not subscriptable
Defining an agent as
Then using the radio scenario and the game loop provided in the docs with 4 of these agents, when one dies an error is thrown by the environment: