LocalView#

class curiosity_gym.core.agentpov.LocalView(radius: int, env_size: tuple[int, int], xray: bool = False)#

Agent point-of-view observing grid cells in a given radius around the agent.

Parameters:
  • radius (int) – Number of cells around the agent to be part of the observation.

  • env_size (tuple[int, int]) – Number of (horizontal, vertical) cells in the grid environment where the pov class is used.

  • xray (bool) – Whether the agent can observe cells behind walls and closed doors.

../_images/LocalView_2.gif

Example of LocalView with a radius of 2 without xray.#

Methods

is_visible

Check if grid cell at given position is visible by the agent.

transform_action

Transform given action so that it is compatible with the grid environment.

transform_obs

Transform environment state to agent observation.