Deriving Semi-Markov Bellman Equations for Options
An option that runs for five steps collects five rewards. The primitive Bellman backup discounts one. That single mismatch is the whole reason the…

Key topics
An option that runs for five steps collects five rewards. The primitive Bellman backup discounts one. That single mismatch is the whole reason the semi-Markov backup exists.
If you already know what options are and how the one-step Bellman backup is derived, the next question is mechanical: what changes when the decision unit is a policy that runs for a random number of steps? The answer is not a cosmetic tweak. The reward term becomes an accumulated sum, the continuation discount becomes a random exponent, and the model becomes a joint distribution over next state and transit time. Let's derive each piece.
Why the One-Step Backup Breaks for Options
The primitive backup for a policy π is:
Read it as: expected immediate reward plus the discounted value of the successor state. Two assumptions are baked in. The transition consumes exactly one time step. The reward is a single scalar, not a sum over a trajectory.
Both assumptions fail the moment you substitute an option for a primitive action. Suppose the option's internal policy runs for steps before its termination condition fires. It collects rewards . The naive substitution credits one reward and applies once. You undercount the reward stream and you undercount the elapsed time. The discount on the continuation term should be , not , and is a random variable.
The repair is to describe the option's outcome with a joint distribution over three things: the terminal state , the accumulated discounted reward collected along the way, and the duration . Once that distribution exists, the backup can be written cleanly.
Knowledge check
Check your understanding
Answer this question before you continue.
Notation and Assumptions
Before the derivation, pin down every symbol.
An option is a triple : an initiation set , an internal policy , and a termination condition . The internal policy is what generates the intermediate rewards — it is not a single action but a distribution over actions at each internal step.
When option is initiated in state , three random variables describe its outcome:
- — the state in which the option terminates
- — the cumulative discounted reward collected during execution,
- — the number of time steps between initiation and termination
The option model is the joint distribution over next state and transit time, . From it, define the discounted transition probability:
This folds the discount into the state prediction so the backup can be written as a single sum. The expected cumulative reward is , where denotes the event of initiating in .
Three assumptions make this valid. Time is discrete. The option's policy and termination condition are stationary. And the semi-Markov property holds: the outcome depends only on the initiating state and the option, not on the history before initiation.
Warning: History-dependent termination conditions — timeouts, or that depends on the trajectory so far — break the state-only form. You then need a history-indexed value function , and the compact backup below no longer applies.
Knowledge check
Check your understanding
Answer this question before you continue.
Deriving the Option Value Backup
Start from the return, conditioned on initiating in :
The first terms are the within-option reward stream. The last term is the continuation. Notice that appears in the exponent of the continuation discount and as the upper limit of the reward sum — it is a random variable living inside the expectation.
Group the reward stream into and apply the tower property by conditioning on the option's outcome :
Now substitute the definition of — the value of the state under the policy over options :
This closes the recursion. Expanding the expectation over the joint distribution gives the summed form:
And the state-value backup follows by marginalizing over the option choice:
The action-value version comes from the same route, replacing with the max over options for the optimality variant. One identity is worth keeping: — the option value at a state equals the state value under the flat policy that the option induces. That identity is what lets you move between the two views without re-deriving anything.
Where the Discount Exponent Comes From
The continuation term carries , and is random. That means the effective discount applied to the successor value is , not . Since , whenever the option can last more than one step. The gap widens as the option's expected duration grows.
This is a real effect, but it is narrower than it first looks. The duration discount lowers the continuation contribution — the discounted value of whatever state the option hands off to. It does not by itself make a longer option worse overall. A longer option also accumulates more within-option reward, and it may terminate in a better state. Those two effects can easily outweigh the extra discounting and reverse the ranking.
So the honest statement is conditional: hold the terminal-state distribution and the continuation values fixed, and a longer duration lowers the continuation term. Change the rewards or the terminal states and the comparison can flip. If you want to see this, take the worked example below and raise the slow outcome's cumulative reward from 1.5 to 2.5. The slow option now wins despite paying instead of .
The discounted transition probability is exactly this discount folded into the state prediction. That is why the compact backup has no visible in the continuation term: the discount has been absorbed into the model. When you estimate from data, you are estimating a quantity that already contains the duration-weighted discount, which is why duration estimation error propagates directly into the value.
Knowledge check
Check your understanding
Answer this question before you continue.
Worked Example: A Two-Step Option Backup
Take a three-state environment with . One option is initiated in . Its internal policy and termination condition produce two possible outcomes:
| Outcome | Terminal state | Duration | Probability | Cumulative reward |
|---|---|---|---|---|
| Fast | 1 | 0.6 | 1.0 | |
| Slow | 2 | 0.4 | 1.5 |
The cumulative reward for the slow case already includes the discount on the second reward: .
Compute the expected cumulative reward:
Compute the discounted transition probabilities:
Note that . The mass that "disappeared" is the duration discount — it is not a probability leak, it is the discount doing its job.
Now suppose and . The backup gives:
Compare against the naive one-step substitution, which would treat as a single action with expected reward 1.2 and a plain transition to a blended successor:
The naive backup overestimates by about 0.11. The error is small here because the durations are short and is close to 1, but the direction is consistent for this outcome distribution: the naive version under-discounts the continuation, so it overvalues the option relative to the correct backup. The error grows with duration and with the gap between the two successor values.
Common mistake: Reading the 0.11 gap as a general rule that "longer options are worse." The gap here is a comparison between two backups of the same option, not a comparison between two different options. Ranking options requires comparing their full values, not their durations.
Knowledge check
Check your understanding
Answer this question before you continue.
Primitive Backup vs Option Backup
| Property | Primitive action | Option |
|---|---|---|
| Decision unit | Single action | Policy with termination condition |
| Reward term | Single expected reward | Expected accumulated discounted reward |
| Continuation discount | , applied once | , random |
| Model requirement | Joint | |
| Backup form |
The reduction check matters: when the option always terminates in one step, deterministically, , and the option backup collapses exactly to the primitive backup. If your derivation does not pass this check, something is wrong.
When the Semi-Markov Backup Applies and When It Does Not
The backup is valid when options are treated as opaque, indivisible units and their outcomes depend only on the initiating state and the option. That is the semi-Markov property, and it is the load-bearing assumption.
It breaks in three places. History-dependent termination — timeouts, or that inspects the trajectory — requires a history-indexed value function. A non-stationary option policy invalidates the fixed . And if the option can be interrupted mid-execution and the interruption changes the value, the opaque-unit assumption fails: you are no longer backing up over a single indivisible transition.
Two costs are worth naming. Planning over a fixed option set yields the best value achievable with those options, which is generally below the optimal value over primitive actions — the option set constrains what you can express. And the joint distribution over next state and duration is harder to estimate than a plain transition probability; duration error feeds straight into the discount term.
My rule: use the semi-Markov backup whenever you are evaluating or improving a policy whose decisions are temporally extended. That is the modeling choice the equation was built for, and it is exact under the semi-Markov assumption regardless of how short or long the options happen to be. Reach for a primitive-action backup when your decision unit really is one step, or when you have deliberately chosen a one-step approximation and can state what you are giving up. Do not assume the approximation is harmless just because durations are short or noisy — a short option still carries a duration-dependent discount, and a noisy duration estimate corrupts the model without making the one-step equation the right substitute.
What to Check Next
Whenever you see an option backup in a paper or write one in code, verify three things. The reward term is accumulated over the option's internal steps, not a single scalar. The continuation discount is raised to the random duration, not applied once. And the model is a joint distribution over next state and transit time, not a plain transition probability. If any of the three is missing, the backup is silently assuming the option ends in one step.
The natural next step is to drop this backup into a value-iteration loop over options and watch how the option set constrains the achievable value. Change the termination conditions. Add a longer option. Observe how the discounted transition probabilities shift and how the value ceiling moves. Then run the controlled comparison the equation actually supports: hold the terminal-state distribution fixed, vary only the duration, and confirm that the continuation term shrinks while the total option value may still rise. The equation stops being notation the moment you watch it rank two options differently — and can explain exactly which term did the ranking.
Knowledge check
Final check
Finish the article by checking the ideas you just learned.
References
Build a stronger RL mental model
Use structured resources to connect equations, algorithms, and observable agent behavior.


