Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 7 of 9 in this unit

Build AI Systems · ORIGINAL LEARN AI LESSON

Learn reusable temporally extended skills.

Train two tabular option policies and logistic termination functions, then compare staged navigation with a flat learner and fixed hierarchy.

By the end: Distinguish learned actions, learned termination, programmed sequencing and runtime budgets, while counting actual environment transitions.

Start with the exampleJump to the experimentRead the explanation
Prerequisites and path options

Why learn this? Test learned option actions and stopping decisions separately from a fixed hierarchy before claiming reusable learned skills.

01 · TRY

Start with something concrete.

A reusable skill needs both a way to move and a way to decide it has finished. A timer stopping an unsuccessful attempt does not prove the skill learned to stop.

Try the interactive model
02 · PREDICT
Before you experiment

A skill reaches its action limit without the target. What happened?

A skill reaches its action limit without the target. What happened?
03 · EXPERIMENT

Change one thing. Watch what follows.

Loading this browser experiment…

04 · UNDERSTAND
READ & CONNECT

Understand what changed.

Back to the experiment

A shorter explanation, with the original worked examples available below. Both explain the same experiment and its limits.

Same learning goal in both modes: Distinguish learned actions, learned termination, programmed sequencing and runtime budgets, while counting actual environment transitions.

The idea in everyday terms

A reusable navigation skill must choose movements and decide when to stop. Two learned tabular options reach cells 0 and 5 on a small grid. The order of those skills is programmed; it is not learned task decomposition.

What to watch in the experiment

Train five episodes at a time. Action values learn from rewards and exact transitions; termination probabilities learn from arrival labels. Compare the learned options with a learned flat staged policy and a fixed shortest-path controller. Read actual transition counts: equal episode counts do not guarantee equal interaction work. Evaluation changes neither action values nor termination.

What this does not establish

Stopping at a runtime budget does not mean the learned skill terminated correctly or reached its goal. Inspect the full trace and final cell. The flat learner has a different intermediate reward, which matters to comparisons. All starts reuse one public map; this does not establish transfer to another environment or a neural-policy result.

Open the full worked examples, calculations and limitations

This is the same reference used in Technical mode. Expand it whenever you need the exact numbers, assumptions or further explanation.

A skill includes knowing when to stop

The grid task asks an agent to visit cell 0 and then cell 5. Rather than choosing every movement with one policy, a controller can call a “reach 0” skill followed by a “reach 5” skill. The high-level order is programmed here. The low-level action values and termination probabilities are learned from actual simulator transitions.

An option consists of an initiation condition, an internal policy and a termination rule. This teaching example permits either option from any cell, chooses a primitive action from its learned Q values, and stops when its learned termination probability reaches 0.8. A safety budget still limits execution even if the learned rule never stops.

Trace a real update

The exact environment is a 2×3 grid. Actions up, right, down and left move one cell; boundary actions remain in the current cell. The option receives reward 1 on reaching its waypoint and −0.05 otherwise. Its Q-learning target is reward plus 0.9 times the best next-state value, except that a true terminal arrival has no bootstrap term.

Suppose the old action value is zero, the next value is 0.4 and the move is nonterminal. The target is −0.05 + 0.9 × 0.4 = 0.31. With learning rate 0.3, the new value is 0.093. Those values are estimates used to choose movement; they are not observed success rates.

Termination uses one logit for each option/cell pair. Its sigmoid converts that logit to a number between zero and one. An exact arrival label supplies the supervised target. Logistic cross-entropy changes the logit by 0.4 times (arrival label minus predicted probability). From a zero logit, a true arrival changes it to 0.2, whose probability is about 0.550. Several consistent examples are needed before the 0.8 threshold is crossed.

Compare an honest set of baselines

The flat learner has a table indexed by task stage and cell. It learns the whole two-waypoint sequence, receiving 0.2 for the first waypoint, 1 for the last and −0.05 otherwise. The fixed hierarchy follows a known shortest-path rule and does not learn. It is a serious control, not a deliberately random opponent.

Both learned controllers receive at most twelve environment transitions per training episode, but their episode lengths can differ. Report both actual transition counts. Equal episode counts do not match interaction work, and different rewards matter when interpreting efficiency. Training caps at 120 episodes and a click executes at most five episodes on CPU; there is no background training timer.

Separate termination and task success

Evaluation never updates Q values or logits. Inspect the complete trace for each of four starts. A learned option might stop in the wrong place, fail to stop at the goal, or spend its entire budget repeating an action. These are different failures. The 24-decision execution ceiling is a runtime safeguard, not evidence that a termination policy was learned correctly.

This is tabular learning on one small, repeatedly exposed map. It is not a neural option policy, learned task decomposition or demonstrated transfer to a new environment. Extend and test one mechanism in the adaptation studio while retaining the exact environment and a declared comparison budget.

05 · APPLY
Check your understanding

Option and flat learners each ran 40 episodes but used different numbers of transitions. Which comparison is justified?

Option and flat learners each ran 40 episodes but used different numbers of transitions. Which comparison is justified?
06 · CONTINUE

Take this idea with you.

An option combines action choice and termination. A fixed high-level sequence can reuse learned skills, but that does not make the sequencing itself learned.

My Learning
Explore related topics and the topic map

How this topic connects

Explore this topic on the interactive map

Use these connections to review a foundation or choose where to go next. You can open any topic without completing the others.

What it builds on

  • Exploration and rewards

    Understand why trying an uncertain option can improve later decisions, even when it costs something now.

  • Forgetting and replay

    Protect an existing skill while teaching a model a new one, using explicit checks for regressions.

You are hereLearn reusable temporally extended skills

Train two tabular option policies and logistic termination functions, then compare staged navigation with a flat learner and fixed hierarchy.

What it enables

  • Adaptation project Apply in a project

    Carry this comparison into the saved adaptation project, with matched baseline checkpoints, retained failures and separate transfer evidence.