openai / multiagent-particle-envs

Code for a multi-agent particle environment used in the paper "Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments"
https://arxiv.org/pdf/1706.02275.pdf
MIT License
2.33k stars 785 forks source link

MultiDiscreteAction appended elements not used #75

Closed tessavdheiden closed 4 years ago

tessavdheiden commented 4 years ago

Hi!

In the environment.py a moving and/or speaking action is executed. If an agent has both, they are not executed. In this piece of code, actions are appended, and in the function only action[0] is used.

Is it true that the environment does not work with agents that both talk and move?

Kimonili commented 4 years ago

Hi @tessavdheiden, did you find the answer on that?

tessavdheiden commented 4 years ago

Hi @Kimonili, yes, please look at this piece. Here you see that an action is substituted with only the last part of itself. You know what I mean? First part is used for agent.action.u, second part for agent.action.c

Kimonili commented 4 years ago

Yes @tessavdheiden I see. So its possible for an agent to be able to speak and move as well. The thing is that when run this code: env.action_space[agent_with_MultiDiscrete2_action_space].n I get an error. My code structure is such that I need to know the number of actions for each agent.

tessavdheiden commented 4 years ago

Where is this line?