Hierarchical RL: Options and the Option-Critic
Flat RL cannot explore a long horizon: reaching reward through hundreds of primitive actions is exponentially unlikely, and every credit-assignment update crawls one step at a time. Hierarchy breaks one hard long-horizon problem into many short ones.
╌╌╌╌
A deep RL agent chooses one primitive action per step: press a button, apply a torque, move one cell. Over a short horizon that is enough. Over a long one it fails. A task that needs five hundred correct actions in sequence before any reward arrives presents two compounded difficulties at once, and flat RL fails on both.
The first is exploration. To stumble onto the first reward by chance, an undirected policy must produce a specific long run of correct actions; the probability of that decays exponentially in the run's length, so the agent may never see a single nonzero reward to learn from. The second is credit assignment. Even granted a reward at the end, a one-step temporal-difference update propagates that signal backward one transition per visit, so information about a decision five hundred steps early takes hundreds of updates to reach it. Both problems are problems of horizon: they are severe precisely because the number of primitive steps between decision and consequence is large.
Humans do not plan at the level of primitive muscle twitches. Asked to make coffee, you decompose: walk to the kitchen, grind the beans, boil water, pour. Each subgoal is itself a small task that bottoms out in motor actions, but you reason about the sequence of subgoals, not the sequence of twitches. The subgoals are temporally extended — each spans many primitive steps — and choosing among four of them is a far shorter, far easier problem than choosing among thousands of raw action sequences. That is the whole idea of hierarchical reinforcement learning: turn one long-horizon problem into a shallow tree of short ones.
The arithmetic of the horizon
Both difficulties are quantifiable, and the numbers show that hierarchy changes the complexity class of the problem. Take a task where actions are available at each step and reward arrives only after a specific run of correct actions. An undirected policy exploring uniformly at random produces that exact run with probability
so it would never, in any practical number of episodes, see a single reward — there is nothing to learn from. Now introduce a manager that picks among subgoals every steps, where each subgoal is a short reaching task the worker can solve. The manager's horizon collapses to decisions, and if it chooses subgoals uniformly the probability of the right sequence of ten is
a -fold improvement; a few million episodes will hit an event of that probability. Credit assignment improves by the same factor: a one-step backup must propagate times to reach the first decision, but a manager backup propagates only times, so the reward signal reaches the earliest choice fifty times faster. The hierarchy changes the exponent, turning into . Every method in this lesson is a way to supply that middle level.
The deep RL frontiers lesson named the central abstraction — the option — and sketched its semi-Markov view. This lesson treats it fully: the three parts of an option, the semi-Markov decision process they generate, and how to learn options end to end rather than hand-design them. The goal-conditioned manager/worker architectures that dominate deep hierarchical RL today, hindsight relabeling for sparse goals, and unsupervised skill discovery continue in a companion lesson. The tabular groundwork for planning with temporally extended actions is in planning and learning; here we carry it into the function-approximation setting.
The options framework
Sutton, Precup, and Singh (1999) formalized temporal abstraction with the option.1 The frontiers lesson introduced an option as a policy paired with a termination rule; the full definition adds a third part that says where the option is allowed to start.
Executing an option is mechanical. When the agent is in a state and selects , control passes to : at each step it draws an action , the environment transitions, and then with probability the option terminates and returns control to the level above; otherwise it continues. The three parts specify when the option may start, what it does while running, and when it stops — nothing more.
The semi-Markov view
An option runs for a random number of primitive steps. That single fact takes us out of the Markov decision process, where every transition consumes exactly one step, and into a semi-Markov decision process (SMDP), where a transition may consume a variable amount of time. If we treat each option as a single temporally-extended action, the top-level process over options is an SMDP: from a state , choosing option lands the agent in a state after primitive steps, where is itself random and governed by .
The SMDP view is what lets every result we already have for actions carry over to
options with almost no change: the top-level agent sees each option as one
action
whose reward is the accumulated discounted reward earned while it ran,
and whose transition skips to wherever the option terminated. The discount comes
out of the run as , so an option that takes many steps is discounted
more heavily — the same total-return arithmetic, applied to variable-length jumps.
Option models and intra-option learning
To plan over options, the agent needs a model of each one, exactly as planning over primitive actions needs a model of the environment. A primitive model gives, for an action, the expected immediate reward and the next-state distribution. An option model gives, for an option launched in state , two things: the expected accumulated discounted reward earned until termination,
and a discounted distribution over the state where it lands and the time it takes,
The discount folded into is the subtle part: because the option can end
after any number of steps, the next state
is really a bundle of possible landing
states each weighted by how long the option ran to get there. With these two
quantities, the Bellman equations and value iteration go through unchanged over an
augmented action set of options plus primitives, and planning is faster because
each option covers many steps in a single backup — the payoff of temporal
abstraction.1
There are two ways to learn about options. The naive one is SMDP learning: run an option to termination, treat the whole extended run as one transition, and apply a single update that jumps from where the option started to where it ended. The SMDP Q-learning update is the ordinary one with the single-step discount replaced by and the single reward replaced by the accumulated discounted return over the option's steps:
A worked SMDP backup. Suppose an option runs for steps, collecting rewards , , , with , and lands in a state whose best option value is . The accumulated return is , the discount on the bootstrap is , and the target is . One backup carried the reward across three primitive steps in a single update — where flat Q-learning would need three separate one-step backups, and three separate visits, to move the same information. That leap is the planning payoff of temporal abstraction, in one line of arithmetic.
SMDP learning works but wastes data — it ignores every intermediate state the option passed through. Intra-option learning does better: it updates the option's value (and those of other options consistent with the actions taken) at every primitive step, using the one-step data as it arrives. Intra-option methods learn about an option without ever running it to completion, and they can update many options from a single stream of experience, which is why they are the standard tabular approach to option learning.1
Learning options end to end
The classical options framework assumes the options are given — a designer supplies the initiation sets, intra-option policies, and termination conditions, and the agent only learns to choose among them and to plan. That is a heavy assumption. Hand-designing good options requires knowing the useful subgoals in advance, which for a hard task is most of the problem. The modern question is whether the options themselves can be discovered by gradient descent, from the task reward alone, with no subgoal ever specified by hand.
The option-critic architecture of Bacon, Harb, and Precup (2017) answers yes.2 It parameterizes the intra-option policies and the termination conditions and differentiates the expected return with respect to those parameters, giving policy-gradient-style updates for both. Write the intra-option policy of option as and its termination as , with a fixed policy-over-options choosing which option to run. Two theorems — the intra-option policy gradient and the termination gradient — give the derivative of the return with respect to and , learned end to end alongside a critic that estimates option values .
The intra-option policy gradient is the familiar actor-critic update, but with the option-value as the critic:
where is the value of taking action inside option . The termination gradient is the informative one. It moves each in the direction that shortens or extends the option based on an advantage: an option should be more likely to terminate in a state where continuing it is worse than switching,
When the advantage is negative — the current option is worse than the best available — the gradient raises , making the option end so a better one can start. When the advantage is positive, it lowers, letting a good option keep running. Terminations are learned as a cost-benefit decision rather than scripted.
Option-critic learns a whole hierarchy from the single task reward, which is its appeal and its weakness. Nothing pressures the discovered options to be diverse or meaningful: a common failure is option collapse, where one option monopolizes behavior and the terminations fire every step, degenerating back to flat RL, or where the options carve the state space into pieces that reduce return but carry no interpretable meaning. Later work adds regularizers (deliberation cost, diversity terms) to keep the options distinct, but the bare architecture already shows that temporal abstraction can be learned rather than designed.
Where this leaves us
The options framework formalizes temporal abstraction. An option is a triple — an initiation set, an internal policy, and a termination condition — that packages a temporally extended behavior into something the top level can select as if it were a single action. Options turn an MDP into a semi-Markov decision process over variable-duration decisions, and this shortens the effective horizon: the top level makes far fewer, far more consequential choices, so both exploration and credit assignment improve.
The option-critic then removes the need to hand-design options at all, learning the intra-option policies and the termination conditions end to end by differentiating the option-value objective — at the cost of the collapse pathologies (options that terminate every step, or one option that swallows the task) that need regularization to prevent.
Options let the agent commit to a sub-behavior, but they do not specify what a good sub-behavior is. A complementary family gives the hierarchy an explicit language of goals: a manager proposes a target state (or a direction in a latent space) and a worker is rewarded for reaching it. That goal-conditioned view, hindsight relabeling for learning from sparse reward, and the unsupervised discovery of skills with no reward at all continue in Hierarchical RL: Goal-Conditioned Hierarchies and Skills.
Footnotes
- Sutton, Precup, Singh (1999),
Between MDPs and semi-MDPs: A framework for temporal abstraction in reinforcement learning
, Artificial Intelligence — introduces the option , the semi-Markov decision process over options, option models (reward and discounted next-state parts), and SMDP versus intra-option learning; see also Sutton & Barto, §17.2, Temporal Abstraction via Options. ↩ ↩2 ↩3 - Bacon, Harb, Precup (2017),
The Option-Critic Architecture
, AAAI — derives the intra-option policy-gradient and termination-gradient theorems and learns option policies and termination functions end to end from task reward with no hand-specified subgoals. ↩
╌╌ END ╌╌