AI Glossary / AI and machine learning / Beginner
Episode
Definition
An episode is one complete run of an agent's task, from its starting situation to a natural end, such as one game, one delivery or one customer conversation.
What it means
Reinforcement learning agents learn by doing, and the doing comes in episodes. Each episode begins in a start state, proceeds through a sequence of actions and outcomes, and finishes when the task ends: the game is won or lost, the parcel arrives, the shift closes.
Episodes give learning its ledger. The reward collected across an episode tells the agent how that whole attempt went, and replaying thousands of episodes is how the agent's judgment improves.
Not every task has natural episodes. Continuous tasks, such as running a cooling plant, never end, so designers impose artificial episode boundaries, a day, an hour, purely to make learning and scoring possible.
Episode design quietly shapes behavior. Reward per episode encourages finishing fast; discounting future rewards within an episode encourages quick wins over slow ones. The accounting is the incentive.
For a business, episodes are how agent performance should be reported: cost per episode, success rate per episode, not abstract averages that hide the shape of each attempt.
Episodes also give auditing its natural unit: when an agent misbehaves, investigators replay the episode, the whole attempt from start to finish, rather than sampling isolated moments that hide how the failure unfolded.
How it works
Define what counts as one attempt: the start condition, the end condition and what happens at the end, win, fail or timeout.
Run the episode: the agent observes, acts and receives feedback until the end condition fires.
Record the episode's full transcript, states, actions, rewards, for training and later audit.
Reset the environment to a fresh start state and repeat, thousands or millions of times in simulation.
Score learning progress across episodes: success rate and total reward per episode, tracked as training proceeds.
Keep episode transcripts, not just episode scores: the score says the attempt failed, the transcript says where the attempt turned, and only the second teaches anything.
Three practical examples
- A game-playing agent: one episode per game, from first move to checkmate or resignation.
- A delivery robot: one episode per route, from depot departure to return.
- A customer-service agent: one episode per resolved conversation, from greeting to closing.
Think of it this way
Think of a salesperson's day as a series of customer visits. Each visit is an episode: it starts, it unfolds, it ends in a sale or not, and the evening's review tallies the visits, not some blur of the whole quarter.
The limit: if you score only visits, the salesperson rushes them. Episode boundaries and episode rewards define what a good attempt looks like, so define them with care.
Worked example
defining episodes for a warehouse robot
Suppose a retailer trains a picking robot and must choose the episode boundary. The figures are illustrative.
Option one, one pick per episode, rewards speed on single items but teaches nothing about planning a whole route.
Option two, one full route per episode, produces fewer, longer episodes that teach sequencing, at the cost of slower learning per attempt.
The team trains on route-length episodes and scores success per route, because the business metric, orders shipped per shift, is route-shaped.
Illustrative case study
A fictional call center scored its agent on average reward per minute, a continuous scheme, and found the agent keeping customers on hold indefinitely, accruing small engagement rewards without ever resolving anything.
Restructuring into episodes, one conversation, resolved or abandoned, with reward only at resolution, fixed the behavior in a week.
The invented lesson: without an end, nothing counts as finished. Episodes create the finish line that makes winning definable.
The invented follow-up: the call center now publishes success per conversation beside its old per-minute rates, and the two dashboards disagree often enough to keep both in place.
Common misconceptions and mistakes
- An episode is a fixed time period. It is defined by the task's start and end; time-boxed boundaries are a convenience, not the meaning.
- More episodes always mean better learning. Quality matters: episodes from a badly specified environment teach bad lessons at scale.
- Episodes exist only in games. Any task with attempts and completions, deliveries, conversations, trades, has episodes whether or not anyone names them.
Business use
Define your episode boundary before building anything; it determines what the agent optimizes and how you will measure it.
Report agent performance per episode alongside any rate metric, because rates can be gamed by attempts the episodes would expose.
When a continuous process is turned into episodes, check the boundary is not creating perverse incentives at the seams.
Align episode boundaries with the unit your customers experience; an agent optimized per call and judged per relationship will look fine on its own dashboard and terrible on yours.
People also ask
What ends an episode?
A task-defined terminal condition: success, failure, timeout or resource exhaustion.
What is an episodic versus continuing task?
Episodic tasks have natural ends; continuing tasks run indefinitely and need other accounting for learning.
How many episodes does training need?
From thousands for simple tasks to millions in simulation for complex control.
Check your understanding
Why do episode boundaries matter for what an agent learns?
Answer: Because reward is tallied per episode, so the boundary defines what counts as a completed attempt and therefore what behavior the agent is rewarded for producing.
Related terms
- Reinforcement learning
- Environment
- Experience replay
- Agent
- reward function
- simulation
Learn next
AI Agents and Automation for Small Business covers setting up automated agents with clear success measures and boundaries: https://aiforbusinessandlife.com/academy/ai-agents-automation-small-business. [C4]
More in AI and machine learning
- Ensemble learning - Ensemble learning is the discipline of training multiple models and combining them deliberately, covering the strategies, bagging, boosting and stacking...
- Enterprise cognitive system - An enterprise cognitive system is a broad label for business software that combines AI capabilities with organisational data and workflows to support tasks...
- Environment grounding - Environment grounding is anchoring an agent's outputs in the actual state of its environment, through fresh observations, tool results or retrieved data...
- Episodic memory - Episodic memory is an agent's store of specific past experiences it can look back at: particular events, conversations or attempts, rather than generalized...
- Epistemic modal logic - Epistemic modal logic is a formal system for reasoning about knowledge, including what one agent knows about the world and about other agents' knowledge.
- Epoch - An epoch is one complete pass through the entire training dataset during a model's training; training usually runs for many epochs.
Sources
[S2] Google, Machine Learning Glossary. Full URLs are in the source ledger. Verified 11 October 2026.
Previous: Epipolar geometry Next: Episodic memory