MultiAgentLearning / playground

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

TF agent not compatible with v2 environment. #245

Closed dnandha closed 2 years ago

dnandha commented 2 years ago

The tensorforce agent is currently not compatible with the v2 environment because of a small mistake:

https://github.com/MultiAgentLearning/playground/blob/4ba44f601157ab04aa0291bed7c2de4bde9e8f6b/pommerman/agents/tensorforce_agent.py#L27

'type' must be changed to string ('int') instead of class type (int).

Because tensorforce/models/distribution_model.py checks for elif action['type'] == 'int' and as it is now, this test fails and self.distributions stays empty. This leads to a runtime error during a later point, e.g. when calculating log_probs for self.distributions for the gradients.

cinjon commented 2 years ago

Thanks! Do you mind submitting a PR?