<gh_stars>0
"""Module defines base environment class."""

from abc import ABC, abstractmethod


class Environment(ABC):
    """Base class for environments."""

    @abstractmethod
    def act(self, action):
        """Tells environment which action to perform and returns reward.

        Args:
          action: The action the agent would like to perform

        Returns:
          A numerical reward signal following the taking of this action.
        """
        pass

    @abstractmethod
    def observe(self):
        """Returns environment's state signal from agent's perspective."""
        pass

    @abstractmethod
    def reset(self) -> None:
        """Resets current environment (e.g. to avoid making from scratch)."""
        pass

    @property
    @abstractmethod
    def done(self) -> bool:
        """Whether terminal state has been reached."""
        pass

    @property
    @abstractmethod
    def state(self):
        """Returns full state of the environment."""
        pass

"""Module defines base environment class."""

from abc import ABC, abstractmethod


class Environment(ABC):
    """Base class for environments."""

    @abstractmethod
    def act(self, action):
        """Tells environment which action to perform and returns reward.

        Args:
          action: The action the agent would like to perform

        Returns:
          A numerical reward signal following the taking of this action.
        """
        pass

    @abstractmethod
    def observe(self):
        """Returns environment's state signal from agent's perspective."""
        pass

    @abstractmethod
    def reset(self) -> None:
        """Resets current environment (e.g. to avoid making from scratch)."""
        pass

    @property
    @abstractmethod
    def done(self) -> bool:
        """Whether terminal state has been reached."""
        pass

    @property
    @abstractmethod
    def state(self):
        """Returns full state of the environment."""
        pass
Module defines base environment class. Base class for environments. Tells environment which action to perform and returns reward.          Args:           action: The action the agent would like to perform          Returns:           A numerical reward signal following the taking of this action. Returns environment's state signal from agent's perspective. Resets current environment (e.g. to avoid making from scratch). Whether terminal state has been reached. Returns full state of the environment.