What is an episode?
An episode is one complete run at a task, from the moment it begins to the moment it ends. As the robot attempts the task, the system records what it observed and what action it took at each step, producing a time-ordered sequence of observation and action pairs. The words trajectory and rollout are used for essentially the same thing, with trajectory emphasizing the path through states and actions, and rollout emphasizing that the sequence was generated by running a policy or a human through the task. Whichever term is used, the object is a single, self-contained attempt.
This is the fundamental unit of data in robot learning, analogous to how a clip or a scene is a unit of data in other fields, but with a crucial difference. The order of the steps is essential. Shuffling the steps of an episode would destroy its meaning, because each action only makes sense in the context of the state that preceded it and the state it leads to. When an episode is performed by an expert, typically a human via teleoperation, it becomes a demonstration, and collections of demonstrations are what many policies are trained on.
Key takeaways
- An episode, trajectory, or rollout is one complete attempt at a task, recorded as a time-ordered sequence of observation and action pairs.
- It is the basic unit of data in robot learning, and its temporal order is essential and must be preserved.
- An expert-performed episode is a demonstration, often collected through teleoperation.
How it works
Recording an episode means capturing, at each time step, what the robot sensed and the action it took, and storing these in order along with timestamps. A run starts from some initial condition, proceeds through the attempt, and ends when the task succeeds, fails, or times out. Because the sequence is what carries the meaning, formats for storing episodes are designed to preserve the exact ordering and timing of steps. Training then treats each episode as a coherent example of how a task unfolds, and evaluation often measures success at the level of whole episodes, asking whether the complete attempt achieved the goal.
Why it matters
Episodes matter because they are the currency of robot learning, the packaged experience from which policies are trained and against which they are judged. For anyone working with robot data, recognizing the episode as the unit clarifies why temporal integrity is non-negotiable, since a corrupted order turns a meaningful attempt into noise. It also explains why robot datasets are counted in episodes or trajectories, and why preserving each one faithfully, from start to finish, is central to building and evaluating capable systems.
Frequently asked questions
Are episode, trajectory, and rollout the same thing?
They refer to essentially the same object, a single complete attempt at a task recorded as a sequence of observation and action pairs. Trajectory stresses the path through states and actions, and rollout stresses that it was produced by running a policy or human, but in practice they are used interchangeably.
Why is temporal order so important?
Each action in an episode only makes sense given the state before it and the state it produces, so the sequence encodes the cause-and-effect structure of the task. Shuffling the steps would destroy that structure, which is why episodes must preserve their exact order and timing.
What is the difference between an episode and a demonstration?
A demonstration is an episode performed by an expert, usually a human via teleoperation, to serve as a good example for training. Every demonstration is an episode, but an episode could also be a mediocre or failed attempt rather than an expert one.
Related terms