# tinker_cookbook.rl.Transition

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

A single (observation, action, reward) tuple from a trajectory.

**Fields:**

- [**ob**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L168) ( _Observation_) – Observation the agent saw before taking the action.
- [**ac**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L170) ( _[TokensWithLogprobs](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/completers/tokenswithlogprobs/)_) – Action taken (tokens and their log-probabilities).
- [**reward**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L172) ( _float_) – Immediate reward received after taking the action.
- [**episode_done**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L174) ( _bool_) – Whether this transition ended the episode.
- [**metrics**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L176) ( _Metrics_, default: `field(default_factory=dict)`) – Numeric values aggregated and reported in training logs.
- [**logs**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L178) ( _Logs_, default: `field(default_factory=dict)`) – Diagnostic info for display/debugging tools (not aggregated like metrics).

## Referenced by

- [tinker_cookbook.rl.Trajectory](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/rl/trajectory/)
