ForwardView.is_visible#
- ForwardView.is_visible(state: ndarray, pos_agent: tuple[int, int], pos_cell: tuple[int, int]) bool#
Check if grid cell at given position is visible by the agent.
A grid cell is visible if there is no wall or closed door between the agent and the cell.
- Parameters:
state (np.ndarray) – Current environment state.
pos_agent (tuple[int,int]) – Position of the agent grid object.
pos_cell (tuple[int,int]) – Position of the cell to check for visibility.
- Returns:
True if there is no wall or closed door between agent and the given cell, False otherwise.
- Return type:
bool