Episode
回合EssentialOne full attempt at a task, from the environment's reset to completion, failure, or timeout.
An episode is the basic unit of time in reinforcement learning and robot learning. After the environment resets to a starting state, the agent acts step by step until the task is completed, fails, or hits a step limit — that whole span is one episode, and the recorded sequence of observations and actions is a trajectory. Gymnasium marks the end of an episode with two separate flags: terminated means the task itself finished, successfully or not, and truncated means it was cut off by an external limit such as a time cap. In robot imitation learning, one demonstration usually corresponds to one episode; when an evaluation reports “50 episodes per task,” it means the robot attempted the task from scratch 50 times and the success rate was computed from that. Note that an episode is not the same thing as a training epoch, which is one full pass through the entire dataset.
ExampleIn a clothes-folding task, one episode runs from laying a wrinkled shirt on the table to the robot finishing the fold or hitting a two-minute timeout.
- Related
- Trajectory · Rollout · Success Rate · Epoch · Termination vs. Truncation · Demonstration Data
- Sources
- Gymnasium Documentation: Basic Usage
OpenAI Spinning Up: Key Concepts in RL