GymActionConversion¶
-
class
maze.core.wrappers.maze_gym_env_wrapper.
GymActionConversion
(env: gym.Env)¶ A dummy conversion interface asserting that the action is packed into a dictionary space.
- Parameters
env – Gym environment.
-
maze_to_space
(maze_action: Any) → Dict[str, numpy.ndarray]¶ (overrides
ActionConversionInterface
)Converts environment MazeAction to agent action.
- param maze_action
the environment MazeAction.
- return
the agent action.
-
space
() → gym.spaces.Dict¶ (overrides
ActionConversionInterface
)Returns respective gym action space.
-
space_to_maze
(action: Dict[str, numpy.ndarray], maze_state: Any) → Any¶ (overrides
ActionConversionInterface
)Converts agent action to environment MazeAction.
- param action
the agent action.
- param maze_state
the environment state.
- return
the environment MazeAction.