# tinker_cookbook.rl.Trajectory

## _class_ [**tinker_cookbook.rl.Trajectory**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L261)()

A complete episode: a sequence of transitions from one agent in one environment.

A trajectory is produced by running an [`Env`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/rl/env/) to completion. It contains all transitions (observation-action-reward triples) plus the final observation after the last action.

**Fields:**

- [**transitions**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L279) ( _list[ [Transition](https://tinker-docs.thinking-machines-lab/tinker-cookbook/api-reference/rl/transition/)_])
- [**final_ob**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L280) ( _Observation_)
- [**stop_reason**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L281) ( _str | None_, default: `None`)

## Referenced by

- [tinker_cookbook.rl.EnvGroupBuilder.compute_group_rewards](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/rl/envgroupbuilder/#envgroupbuilder-compute_group_rewards)
- [tinker_cookbook.rl.ProblemGroupBuilder.compute_group_rewards](https://tinker-docs.thinking-machines-ai/cookbook/api-reference/rl/problemgroupbuilder/#problemgroupbuilder-compute_group_rewards)
- [tinker_cookbook.rl.trajectory_to_data](https://tinker-docs.thinking-machines-ai/cookbook/api-reference/rl/trajectory_to_data/)
- [tinker_cookbook.rl.TrajectoryGroup](https://tinker-docs.thinking-machines-ai/cookbook/api-reference/rl/trajectorygroup/)
