space_info#
Source code: tianshou/utils/space_info.py
- class ActionSpaceInfo(*, action_shape: int | Sequence[int], min_action: float, max_action: float)[source]#
Bases:
ToStringMixinA data structure for storing the different attributes of the action space.
- action_shape: int | Sequence[int]#
The shape of the action space.
- min_action: float#
The smallest allowable action or in the continuous case the lower bound for allowable action value.
- max_action: float#
The largest allowable action or in the continuous case the upper bound for allowable action value.
- property action_dim: int#
Return the number of distinct actions (must be greater than zero) an agent can take it its action space.
- class ObservationSpaceInfo(*, obs_shape: int | Sequence[int])[source]#
Bases:
ToStringMixinA data structure for storing the different attributes of the observation space.
- obs_shape: int | Sequence[int]#
The shape of the observation space.
- property obs_dim: int#
Return the number of distinct features (must be greater than zero) or dimensions in the observation space.
- class SpaceInfo(*, action_info: ActionSpaceInfo, observation_info: ObservationSpaceInfo)[source]#
Bases:
ToStringMixinA data structure for storing the attributes of both the action and observation space.
- action_info: ActionSpaceInfo#
Stores the attributes of the action space.
- observation_info: ObservationSpaceInfo#
Stores the attributes of the observation space.