NoDictSpacesWrapper

class maze.core.wrappers.no_dict_spaces_wrapper.NoDictSpacesWrapper(*args, **kwds)

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

(overrides StructuredEnvSpacesMixin)

The currently active gym action space.

property action_spaces_dict

(overrides StructuredEnvSpacesMixin)

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

clone_from(env: maze.core.wrappers.no_dict_spaces_wrapper.NoDictSpacesWrapper)None

(overrides SimulatedEnvMixin)

implementation of SimulatedEnvMixin.

get_observation_and_action_dicts(maze_state: Optional[Any], maze_action: Optional[Any], first_step_in_episode: bool) → Tuple[Optional[Dict[Union[int, str], Any]], Optional[Dict[Union[int, str], Any]]]

(overrides Wrapper)

Convert the observations, reverse the actions.

observation(observation: Any) → Any

Implementation of ObservationWrapper interface.

property observation_space

(overrides StructuredEnvSpacesMixin)

The currently active gym observation space.

property observation_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.