NoDictActionWrapper

class maze.core.wrappers.no_dict_action_wrapper.NoDictActionWrapper(env)

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

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

(overrides ActionWrapper)

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: NoDictActionWrapper) None

(overrides SimulatedEnvMixin)

implementation of SimulatedEnvMixin.

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

(overrides ActionWrapper)

Implementation of ActionWrapper interface.