[Feature Request] Include group-level done fields in the VMAS environment #2536
Description
Motivation
In the current implementation of the VMAS environment, the done fields are only available on the root of the tensordict. However, for training, it is useful to have them in the group-level.
This is also an issue for the TorchRL tutorial scripts multiagent_ppo.py
and multiagent_competitive_ddpg.py
, which have to manually add the done and terminated at group-level with the right shape
https://github.com/pytorch/rl/blob/main/tutorials/sphinx-tutorials/multiagent_ppo.py#L655
https://github.com/pytorch/rl/blob/main/tutorials/sphinx-tutorials/multiagent_competitive_ddpg.py#L732
The PettingZoo env implementation does include the group-level done fields.
So, can we also include these fields in the VMAS code? If so, I'd be willing to work on this feature.
Checklist
- I have checked that there is no similar issue in the repo (required)