SortedSpacesWrapper

class maze.core.wrappers.sorted_spaces_wrapper.SortedSpacesWrapper(*args, **kwds)

This class wraps a given StructuredEnvSpacesMixin env to ensure that all observation- and action-spaces are sorted alphabetically. This is required that Maze custom action distributions and observation processing are in line with RLLib’s internal processing pipeline.

property action_space

The currently active gym action space.

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]]]

This wrapper does not modify observations and actions.

property observation_space

Keep this env compatible with the gym interface by returning the observation space of the current policy.