multiagent-particle-envs icon indicating copy to clipboard operation
multiagent-particle-envs copied to clipboard

Checking collisions with agent itself?

Open tessavdheiden opened this issue 5 years ago • 3 comments

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):

tessavdheiden avatar Apr 06 '20 08:04 tessavdheiden

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

medhijk avatar Feb 16 '22 16:02 medhijk

Hi!

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

tessavdheiden avatar Feb 16 '22 17:02 tessavdheiden

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

Edision-liu avatar Dec 17 '22 06:12 Edision-liu