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

        Args:
            x: Actions to check.

        Returns:
            True if the action space contains all actions 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.action_space.contains(x)

        logger.warning("action_space_contains() has not been implemented")
        return True
Checks if the action space contains the given action.

        Args:
            x: Actions to check.

        Returns:
            True if the action space contains all actions in x.
        
Checks if the action space contains the given action.
Checks if the action space contains the given action .
def action_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.action_space.contains(x)
        logger.warning("action_space_contains() has not been implemented")
        return True
def action_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 . action_space . contains ( x ) logger . warning ( "action_space_contains() has not been implemented" ) return True
Checks if the action space contains the given action.
Checks if the action space contains the given action .
"""Checks if the action space contains the given action.

        Args:
            x: Actions to check.

        Returns:
            True if the action space contains all actions in x.
        """
True if the action space contains all actions in x.
True if the action space contains all actions in x .
self
x
MultiAgentDict
Actions to check.
Actions to check .