Options framework

Also known as: options · temporally extended actions

On this page 7

The options framework is a formalism in reinforcement learning for representing temporally extended actions, called options, that an agent can select as single decisions even though each one runs for many time steps. Introduced by Sutton, Precup and Singh in 1999, it extends the Markov decision process so that an agent can reason and learn at several time scales at once, mixing primitive actions with reusable skills such as walking to a door or grasping an object.

The framework is the most widely used foundation of hierarchical reinforcement learning. Its central result is that a Markov decision process augmented with options becomes a semi-Markov decision process, so standard planning and learning methods such as value iteration and Q-learning carry over to options with only modest changes.

How an option is defined

An option is a triple of three components: an initiation set, an intra-option policy and a termination condition. The initiation set lists the states in which the option may start. The intra-option policy chooses primitive actions while the option runs. The termination condition gives, for each state, the probability that the option ends there and control returns to the higher-level policy.

A primitive action is a special case: an option that can start anywhere, takes one action and always terminates after one step. This makes options a strict generalization, so an agent can hold a single action set that mixes primitive actions with longer skills. The higher-level choice among options is made by a policy over options.

ComponentSymbolRole
Initiation setIStates where the option is available
Intra-option policyπSelects actions while the option runs
Termination conditionβProbability of stopping in each state
Policy over optionsμChooses which option to execute next
Components of an option

Options and semi-Markov decision processes

When an agent executes an option, the time between decisions becomes variable rather than fixed. A process with variable decision durations is a semi-Markov decision process (SMDP). The options framework shows that any Markov decision process plus a fixed set of options defines an SMDP, while the underlying process still evolves step by step.

The Bellman equation adapts naturally. The value of starting an option is the discounted reward accumulated while it runs plus the discounted value of the state where it ends, with the discount factor raised to the number of steps the option lasted. Option models, which predict this cumulative reward and the distribution of termination states, let an agent plan with options in the same way that a one-step model lets it plan with actions.

The following table compares the three decision models involved.

ModelDecision timingWhat the agent chooses
Markov decision processEvery time stepPrimitive actions
Semi-Markov decision processVariable intervalsAbstract actions of random duration
MDP with optionsVariable, with step-level detailOptions and primitive actions
MDP, SMDP and options compared

Learning with options

Learning splits into two problems. The first is learning a policy over given options, which SMDP Q-learning solves by updating the value of an option only when it terminates. Intra-option learning is more efficient: because every step of an option’s execution is consistent with other options that would have taken the same action, the agent can update many options from a single transition, which is a form of off-policy learning.

The second and harder problem is discovering useful options in the first place. Early methods defined options by hand or derived subgoals from bottleneck states, such as doorways in a grid world. The option-critic architecture (2017) learns intra-option policies and termination functions end to end with policy gradient methods, and later work uses intrinsic motivation, eigenoptions derived from the successor representation or diversity objectives to find skills without external reward.

ApproachHow options ariseMain limitation
Hand-designed optionsEngineer specifies subgoalsRequires domain knowledge
Bottleneck discoveryGraph analysis of visited statesScales poorly to large spaces
Option-criticGradient-based end-to-end learningOptions may collapse or degenerate
EigenoptionsEigenvectors of state-transition structureNeeds good state representation
Skill discovery by diversityMaximize distinguishable behaviorsSkills may not match task needs
Approaches to obtaining options

Why temporal abstraction helps

Options address the credit assignment problem and sparse rewards by shortening the effective horizon. A task requiring a thousand primitive steps may need only a handful of option choices, so reward information propagates back through far fewer decisions. Exploration also improves, because executing a coherent skill moves the agent farther in the state space than random primitive actions.

Options support transfer and reuse. A skill such as opening a door can serve many tasks with different reward functions. Planning becomes cheaper because option models allow jumps over long stretches of behavior instead of simulating every step.

The table below summarizes the main benefits of options and the mechanism behind each one.

BenefitMechanismTypical setting
Faster credit assignmentFewer decisions per episodeLong-horizon tasks
Better explorationCoherent multi-step behaviorSparse reward environments
Skill reuseOptions shared across tasksRobotics and navigation
Cheaper planningOption models skip intermediate stepsModel-based reinforcement learning
Benefits of temporal abstraction with options

Options also connect to other hierarchical designs. Feudal reinforcement learning and goal-conditioned managers issue subgoals instead of named skills, while the MAXQ decomposition splits the value function by subtask. The options framework remains the most general of these views because it places few constraints on what an option contains.

Limitations and common pitfalls

Options can hurt as well as help. A poorly chosen set of options biases exploration, and if the options cannot reach the goal the optimal policy may be unreachable without primitive actions. Learned options often degenerate, either terminating at every step, which removes the temporal abstraction, or never terminating, so that one option does the entire task.

  • Omitting primitive actions and losing guarantees of optimality.
  • Using termination functions that switch too often, which undoes the abstraction.
  • Learning options on one task and expecting them to transfer automatically to unrelated tasks.
  • Confusing options with goal-conditioned policies, which are a related but distinct idea.
  • Ignoring the extra variance and instability of jointly learning two policy levels.

In plain words

The options framework lets a learning agent think in skills instead of single moves. A person making coffee does not plan each muscle twitch. They think in steps such as fill the kettle, grind the beans and pour the water.

Each option works the same way. It says when a skill can start, what to do while it runs and when to stop. The agent then chooses among skills. This makes long tasks shorter to learn, because there are fewer big decisions to get right.

A real-world example

A warehouse robotics team trains a mobile robot to fetch items from shelves in a building with twelve aisles. With primitive actions only, such as moving 10 centimeters or turning 15 degrees, a single fetch takes several hundred steps, and the agent rarely reaches the reward during early training.

The team defines options such as go to aisle entrance, follow aisle to shelf, align with shelf and return to packing station, each with its own termination condition. The policy over options now needs only five to eight decisions per fetch. Training converges in far fewer episodes, and the aisle navigation options are reused without retraining when the warehouse adds a new task of restocking shelves, which demonstrates the main benefit of temporal abstraction.