coopihczoo.teaching.scripts_to_sort.behavioral_cloning_original.Trajectory

class coopihczoo.teaching.scripts_to_sort.behavioral_cloning_original.Trajectory(obs: numpy.ndarray, acts: numpy.ndarray, infos: Optional[numpy.ndarray], terminal: bool)[source]

Bases: object

A trajectory, e.g. a one episode rollout from an expert policy.

Methods

Attributes

obs

Observations, shape (trajectory_len + 1, ) + observation_shape.

acts

Actions, shape (trajectory_len, ) + action_shape.

infos

An array of info dicts, length trajectory_len.

terminal

Does this trajectory (fragment) end in a terminal state?

acts: numpy.ndarray

Actions, shape (trajectory_len, ) + action_shape.

infos: Optional[numpy.ndarray]

An array of info dicts, length trajectory_len.

obs: numpy.ndarray

Observations, shape (trajectory_len + 1, ) + observation_shape.

terminal: bool

Does this trajectory (fragment) end in a terminal state?

Episodes are always terminal. Trajectory fragments are also terminal when they contain the final state of an episode (even if missing the start of the episode).