Agent.step#

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

Perform a given action.

The agent is the main recipient of the action specified in the step function of the environment. For the action of moving forward, the agent considers the walkable parameter provided by the environment to determine if it can change its position accordingly. For the interaction action, the agent will call the GridObject.interact() method of the object in front of it.

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:

Returns 0.

Return type:

float