rllib/env/multi_agent_env.py
def observation_space_contains(self, x: MultiAgentDict) -> bool:
        """Checks if the observation space contains the given key.

        Args:
            x: Observations to check.

        Returns:
            True if the observation space contains the given all observations
                in x.
        """
        if (
            not hasattr(self, "_spaces_in_preferred_format")
            or self._spaces_in_preferred_format is None
        ):
            self._spaces_in_preferred_format = (
                self._check_if_space_maps_agent_id_to_sub_space()
            )
        if self._spaces_in_preferred_format:
            return self.observation_space.contains(x)

        logger.warning("observation_space_contains() has not been implemented")
        return True
Checks if the observation space contains the given key.

        Args:
            x: Observations to check.

        Returns:
            True if the observation space contains the given all observations
                in x.
        
Checks if the observation space contains the given key.
Checks if the observation space contains the given key .
def observation_space_contains(self, x: MultiAgentDict) -> bool:
        if (
            not hasattr(self, "_spaces_in_preferred_format")
            or self._spaces_in_preferred_format is None
        ):
            self._spaces_in_preferred_format = (
                self._check_if_space_maps_agent_id_to_sub_space()
            )
        if self._spaces_in_preferred_format:
            return self.observation_space.contains(x)
        logger.warning("observation_space_contains() has not been implemented")
        return True
def observation_space_contains ( self , x : MultiAgentDict ) -> bool : if ( not hasattr ( self , "_spaces_in_preferred_format" ) or self . _spaces_in_preferred_format is None ) : self . _spaces_in_preferred_format = ( self . _check_if_space_maps_agent_id_to_sub_space ( ) ) if self . _spaces_in_preferred_format : return self . observation_space . contains ( x ) logger . warning ( "observation_space_contains() has not been implemented" ) return True
Checks if the observation space contains the given key.
Checks if the observation space contains the given key .
"""Checks if the observation space contains the given key.

        Args:
            x: Observations to check.

        Returns:
            True if the observation space contains the given all observations
                in x.
        """
True if the observation space contains the given all observations
in x.
True if the observation space contains the given all observations in x .
self
x
MultiAgentDict
Observations to check.
Observations to check .