DistractiveEnv.step#

DistractiveEnv.step(action: int | Action) tuple[ndarray, float, bool, bool, dict[str, Any]]#

Run one timestep of the environment’s dynamics using the agent actions.

When the end of an episode is reached (terminated or truncated), it is necessary to call reset() to reset this environment’s state for the next episode.

See also

The method is part of the Gymnasium environment api.

Parameters:

action (int | Action) – Action selected by the RL agent.

Returns:

  • observation (np.ndarray) – An element of the observation_space that represents the agents observation.

  • reward (float) – The reward as a result of taking the specified action.

  • terminated (bool) – End of episode by reaching a terminal state. Can be achieved by completing the task of an environment or agent contact with a harmful grid object. If true, the user needs to call reset().

  • truncated (bool) – Typically, this is a timelimit, but could also be used to indicate an agent physically going out of bounds. Can be used to end the episode prematurely before a terminal state is reached. If true, the user needs to call reset().

  • info (dict) – Contains auxiliary diagnostic information for debugging, learning and logging.