Key.step#

Key.step(action: Action, front_object: Self | None = None, walkable: bool = False) float#

Compute grid object changes after single timestep.

The default step behaviour is idle and gives 0 reward.

Parameters:
  • action (Action) – Action taken in a grid environment by the RL agent.

  • front_object (GridObject | None, optional) – Grid object currently in front of the RL agent, by default None.

  • walkable (bool, optional) – Wheter the agent can move over the cell in front, by default False.

Returns:

Optional reward, which is independent of the environment task and episode termination.

Return type:

float