Module moog.observers.abstract_observer

Abstract observer.

Classes

class AbstractObserver
Expand source code
class AbstractObserver(abc.ABC):
    """Abstract observer class.
    
    All observers must inherit from this class.
    """
    
    @abc.abstractmethod
    def __call__(self, state):
        """Observe the environment state.
        
        Args:
            state: OrderedDict of iterables of sprites.

        Returns:
            observation. Observation of the environment state. Type and size of
                the observation may vary over time, depending on the observer.
        """
        pass

    @abc.abstractmethod
    def observation_spec(self):
        """Get observation spec for the output.
        
        Returns:
            dm_env.specs.ArraySpec or nested structure of such.
        """
        pass

Abstract observer class.

All observers must inherit from this class.

Ancestors

  • abc.ABC

Subclasses

Methods

def observation_spec(self)
Expand source code
@abc.abstractmethod
def observation_spec(self):
    """Get observation spec for the output.
    
    Returns:
        dm_env.specs.ArraySpec or nested structure of such.
    """
    pass

Get observation spec for the output.

Returns

dm_env.specs.ArraySpec or nested structure of such.