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.27k stars 785 forks source link

Checking collisions with agent itself? #70

Open tessavdheiden opened 4 years ago

tessavdheiden commented 4 years ago

Hi!

Is it true that in simple_spread.py collisions are checked with the agents themselves: if agent.collide:
for a in world.agents:
if self.is_collision(a, agent): line: https://github.com/openai/multiagent-particle-envs/blob/69ee7f85811c77ee651722bc3c332677b2195da1/multiagent/scenarios/simple_spread.py#L78

Maybe do something like: if agent.collide:
for a in world.agents:
if agent == a: continue
if self.is_collision(a, agent):

medhijk commented 2 years ago

Have you noticed any improvement in average rewards per episode due to this change? I am curious.

tessavdheiden commented 2 years ago

Hi!

No, because it will just add a constant negative reward everytime, so the gradient is not affected ;-)

Edision-liu commented 1 year ago

Swarm intelligence on reinforcement learning for more than 50 agents without collision: https://github.com/Edision-liu/Reinforcement-learning-on-MAPE