# Module: tf_agents.trajectories.trajectory

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/trajectories/trajectory.py) |

Trajectory containing time_step transition information.

## Classes

[`class Trajectory`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/Trajectory): A tuple that represents a trajectory.

[`class Transition`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/Transition): A tuple that represents a transition.

## Functions

[`boundary(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/boundary): Create a Trajectory transitioning between StepTypes `LAST` and `FIRST`.

[`experience_to_transitions(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/trajectory/experience_to_transitions): Break experience to transitions.

[`first(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/first): Create a Trajectory transitioning between StepTypes `FIRST` and `MID`.

[`from_episode(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/trajectory/from_episode): Create a Trajectory from tensors representing a single episode.

[`from_transition(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/from_transition): Returns a `Trajectory` given transitions.

[`last(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/last): Create a Trajectory transitioning between StepTypes `MID` and `LAST`.

[`mid(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/mid): Create a Trajectory transitioning between StepTypes `MID` and `MID`.

[`single_step(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/single_step): Create a Trajectory transitioning between StepTypes `FIRST` and `LAST`.

[`to_n_step_transition(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/to_n_step_transition): Create an n-step transition from a trajectory with `T=N + 1` frames.

[`to_transition(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/to_transition): Create a transition from a trajectory or two adjacent trajectories.

[`to_transition_spec(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/to_transition_spec): Create a transition spec from a trajectory spec.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| absolute_import | Instance of `__future__._Feature` |
| division | Instance of `__future__._Feature` |
| print_function | Instance of `__future__._Feature` |

<br />