hyphi_gym.envs.HoleyGrid#

Package Contents#

Classes#

Grid

Base for grid-based games managing

Holes

Gridworld Maze Environment based on hyphi Grid.

HoleyGrid

Gridworld Maze Environment based on hyphi Grid.

class hyphi_gym.envs.HoleyGrid.Grid(render_mode: hyphi_gym.common.board.Optional[str] = None, **simargs)#

Bases: hyphi_gym.common.rendering.Rendering, hyphi_gym.common.point.Point

Base for grid-based games managing • A layout of a variable size • Containing CELLS[WALL, FIELD, AGENT, TARGET, HOLE] • Navigable with ACTIONS[UP, RIGHT, DOWN,LEFT]

step_scale = 1#
base_xml#
metadata#
render() hyphi_gym.common.board.Optional[hyphi_gym.common.board.np.ndarray]#

Return rendering of current state as np array if render_mode set

reset(**kwargs) tuple[hyphi_gym.common.board.np.ndarray, dict]#

Gymnasium compliant function to reset the environment

_distance()#
execute(action: int) tuple[hyphi_gym.common.board.np.ndarray, dict]#

Helper function to step the environment, executing action, returning its consequences

class hyphi_gym.envs.HoleyGrid.Holes(level: str, random=[], **kwargs)#

Bases: hyphi_gym.common.board.Board

Gridworld Maze Environment based on hyphi Grid. :param level: Configuration to use [Train|Shift] :param random: optional list of features to be stochastic supporting layout, agent-, and target-placement

_generate()#

Random generator for holey grids, placing mean(size) holes

class hyphi_gym.envs.HoleyGrid.HoleyGrid(level='Train', render_mode=None, **kwargs)#

Bases: hyphi_gym.common.holes.Holes, hyphi_gym.common.grid.Grid

Gridworld Maze Environment based on hyphi Grid. :param level: Configuration to use [Train|Shift] :param random: optional list of features to be stochastic supporting layout, agent-, and target-placement