NoDictSpacesWrapper

class maze.core.wrappers.no_dict_spaces_wrapper.NoDictSpacesWrapper(env)

Wraps observations and actions by replacing dictionary spaces with the sole contained sub-space. This wrapper is for example required when working with external frameworks not supporting dictionary spaces.

action(action: numpy.ndarray) Dict[str, numpy.ndarray]

Implementation of ActionWrapper interface.

property action_space: gymnasium.spaces.Space

(overrides StructuredEnvSpacesMixin)

The currently active gym action space.

property action_spaces_dict: Dict[int | str, gymnasium.spaces.Dict]

(overrides StructuredEnvSpacesMixin)

A dictionary of gym action spaces, with policy IDs as keys.

clone_from(env: NoDictSpacesWrapper) None

(overrides SimulatedEnvMixin)

implementation of SimulatedEnvMixin.

get_observation_and_action_dicts(maze_state: Any | None, maze_action: Any | None, first_step_in_episode: bool) Tuple[Dict[int | str, Any] | None, Dict[int | str, Any] | None]

(overrides Wrapper)

Convert the observations, reverse the actions.

observation(observation: Any) Any

Implementation of ObservationWrapper interface.

property observation_space: gymnasium.spaces.Space

(overrides StructuredEnvSpacesMixin)

The currently active gym observation space.

property observation_spaces_dict: Dict[int | str, gymnasium.spaces.Dict]

(overrides StructuredEnvSpacesMixin)

A dictionary of gym observation spaces, with policy IDs as keys.

reset() Any

(overrides BaseEnv)

Intercept BaseEnv.reset and map observation.

reverse_action(action: Dict[str, numpy.ndarray]) numpy.ndarray

Implementation of ActionWrapper interface.

step(action) Tuple[Any, Any, bool, Dict[Any, Any]]

Intercept BaseEnv.step and map observation.