|
|
|
|
|
|
|
|
|
|
from abc import ABC, abstractmethod |
|
|
|
from collections.abc import Mapping |
|
|
|
from enum import Enum |
|
|
|
from typing import ( |
|
|
|
List, |
|
|
|
NamedTuple, |
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
class SensorType(Enum): |
|
|
|
OBSERVATION = 0 |
|
|
|
PARAMETERIZATION = 1 |
|
|
|
REWARD = 2 |
|
|
|
|
|
|
|
|
|
|
|
class ActionSpec(NamedTuple): |
|
|
|
""" |
|
|
|
A NamedTuple containing utility functions and information about the action spaces |
|
|
|
|
|
|
- observation_shapes is a List of Tuples of int : Each Tuple corresponds |
|
|
|
to an observation's dimensions. The shape tuples have the same ordering as |
|
|
|
the ordering of the DecisionSteps and TerminalSteps. |
|
|
|
- sensor_types is a List of SensorTypes, each corresponding to the type of |
|
|
|
sensor (i.e. observation, goal, etc). |
|
|
|
sensor_types: List[SensorType] |
|
|
|
action_spec: ActionSpec |
|
|
|
|
|
|
|
|
|
|
|