colosseum.mdp.base_infinite

 1import abc
 2from typing import TYPE_CHECKING
 3
 4from colosseum.mdp import BaseMDP
 5
 6if TYPE_CHECKING:
 7    from colosseum.mdp import NODE_TYPE
 8
 9
10class ContinuousMDP(BaseMDP, abc.ABC):
11    """
12    The base class for continuous MDPs.
13    """
14
15    @staticmethod
16    def is_episodic() -> bool:
17        return False
18
19    def get_grid_representation(self, node: "NODE_TYPE", h: int = None):
20        return super(ContinuousMDP, self)._get_grid_representation(node)
class ContinuousMDP(colosseum.mdp.base.BaseMDP, abc.ABC):
11class ContinuousMDP(BaseMDP, abc.ABC):
12    """
13    The base class for continuous MDPs.
14    """
15
16    @staticmethod
17    def is_episodic() -> bool:
18        return False
19
20    def get_grid_representation(self, node: "NODE_TYPE", h: int = None):
21        return super(ContinuousMDP, self)._get_grid_representation(node)

The base class for continuous MDPs.

@staticmethod
def is_episodic() -> bool:
16    @staticmethod
17    def is_episodic() -> bool:
18        return False
Returns
  • bool: True if the MDP is episodic.
20    def get_grid_representation(self, node: "NODE_TYPE", h: int = None):
21        return super(ContinuousMDP, self)._get_grid_representation(node)
Returns
  • np.ndarray: An ASCII representation of the state given in input stored as numpy array.