proroklab / VectorizedMultiAgentSimulator

VMAS is a vectorized differentiable simulator designed for efficient Multi-Agent Reinforcement Learning benchmarking. It is comprised of a vectorized 2D physics engine written in PyTorch and a set of challenging multi-robot scenarios. Additional scenarios can be implemented through a simple and modular interface.
https://vmas.readthedocs.io
GNU General Public License v3.0
335 stars 69 forks source link

Inconsistency with shared reward args name #114

Closed KaleabTessera closed 4 months ago

KaleabTessera commented 4 months ago

In some places the shared reward param is called share_reward (e.g. https://github.com/proroklab/VectorizedMultiAgentSimulator/blob/f4f8a8964336a86e60bc06ae72b51a2ae0a1e4af/vmas/scenarios/dispersion.py#L16), while in others shared_rew (e.g. https://github.com/proroklab/VectorizedMultiAgentSimulator/blob/f4f8a8964336a86e60bc06ae72b51a2ae0a1e4af/vmas/scenarios/multi_give_way.py#L28C39-L28C49).

Since there is no validation on the kwargs, it is easy to make a mistake with the name of this param, especially since it is not consistent. I think making all envs have the same param name would be useful.

matteobettini commented 4 months ago

Hey!

Yes, I feel the same way.

For backwards compatibility reasons I cannot change the names now as this would cause all sorts of issues, what I can do is adding kwargs checking so that if users pass a parameter that is not expected we raise an error (warning for now and eventually error)

What do you think?

KaleabTessera commented 4 months ago

Yeah sounds good. I like your implementation :+1: