gxm.Trajectory#

class Trajectory(obs, true_obs, action, reward, terminated, truncated, info)#

Bases: object

Class representing a trajectory \((S_0, A_0, R_0, S_1, ..., S_n)\) in an environment.

__init__(obs, true_obs, action, reward, terminated, truncated, info)#

Methods

__init__(obs, true_obs, action, reward, ...)

Attributes

done

Return whether the episode has ended (either terminated or truncated).

obs

The observations \((S_0, S_1, ..., S_n)\) in the trajectory.

true_obs

The true observations \((\hat{S}_0, \hat{S}_1, ..., \hat{S}_n)\) in the trajectory.

action

The actions \((A_0, A_1, ..., A_{n-1})\) taken in the trajectory.

reward

The rewards \((R_0, R_1, ..., R_{n-1})\) received in the trajectory.

terminated

Whether the episode terminated at each timestep in the trajectory.

truncated

Whether the episode was truncated at each timestep in the trajectory.

info

Additional information about the trajectory.

action: Any#

The actions \((A_0, A_1, ..., A_{n-1})\) taken in the trajectory.

property done: Array#

Return whether the episode has ended (either terminated or truncated).

info: dict[str, Any]#

Additional information about the trajectory.

obs: Any#

The observations \((S_0, S_1, ..., S_n)\) in the trajectory.

reward: Array#

The rewards \((R_0, R_1, ..., R_{n-1})\) received in the trajectory.

terminated: Array#

Whether the episode terminated at each timestep in the trajectory.

true_obs: Any#

The true observations \((\hat{S}_0, \hat{S}_1, ..., \hat{S}_n)\) in the trajectory. These may differ from obs in environments that allow truncation.

truncated: Array#

Whether the episode was truncated at each timestep in the trajectory.