# Agent Masking in Multi-agent environment?

**URL:** <https://discuss.pytorch.org/t/agent-masking-in-multi-agent-environment/222925>\
**Category:** reinforcement-learning\
**Created:** [September 7, 2025, 2:32pm UTC](https://discuss.pytorch.org/t/agent-masking-in-multi-agent-environment/222925 "2025-09-07T14:32:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-Marc\_Fauche](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jean-marc_fauche/32/64545_2.png) [@Jean-Marc\_Fauche](https://discuss.pytorch.org/u/Jean-Marc_Fauche)\
**Post date:** [September 7, 2025, 2:32pm UTC](https://discuss.pytorch.org/t/agent-masking-in-multi-agent-environment/222925/1 "2025-09-07T14:32:32Z")

</div>

Hi, I would like to know if there is a way to implement an “agent mask”. To clarify things: let’s imagine an environment that for certain steps provides data or not to the agents. Some agents have it, others do not. It would be logical that for an agent with no observation (so with agent\_mask=False) the policy does not provide an action and that for the calculation of the loss, the transitions concerned are ignored…
