Sequential Reasoning
Sequential Decision Models: Acting for Future Rewards
Sequential decision models describe choices whose consequences extend beyond the next outcome. A delivery robot might earn a reward by completing a job now but finish with too little charge for its next job. You therefore compare actions using both their immediate rewards and the opportunities they leave available. Here, the environment is fully observed, transition probabilities are known, and a fixed number of decisions remains.
Represent the decision process
A Markov decision process, or MDP, represents repeated action choices using states, available actions, transition probabilities, and rewards. At decision time t, you observe state s, choose an allowed action a, receive a reward, and reach a next state s′.
The state should retain the information needed to predict the next state and reward once the action is specified. This is the Markov property. A robot's location alone may be insufficient if its remaining charge also affects which jobs it can complete. Including charge can repair that omission, provided no other omitted history remains predictive.
Write the transition probability as Pt(s′∣s,a) and the immediate reward as rt(s,a,s′). For each allowed state-action pair, the probabilities across possible next states sum to one. Rewards can be negative: a charging cost or delay can be represented on the same scale as a positive job reward.
A horizon H gives decision times 0,…,H−1. State sH is reached after the last action, and g(sH) records any terminal payoff, such as the remaining value of stored energy.
Specify how actions depend on observations
A policy specifies which action to take for each observed state and decision time. We write a deterministic policy as a=πt(s). It can respond to the state actually reached rather than committing to one sequence in advance.
Decision description | What is specified | Response to uncertain outcomes |
|---|---|---|
Fixed action sequence | An action for each decision time | Later actions remain committed |
State-dependent policy | An action for each state and decision time | Later actions follow the observed state |
Even when transition probabilities and rewards do not change with time, the best policy can depend on the remaining horizon. Recharging may help when several jobs remain but waste the final opportunity to earn a reward.
Compare immediate and future rewards
For a sequence of realized rewards, the return from time t is
The discount factor γ, with 0≤γ≤1, controls the weight on later rewards. With a finite horizon, γ=1 is valid and gives an undiscounted total. The objective here is to maximize expected return, rather than guarantee a particular realized outcome.
Let Vt(s) be the best expected return available from state s at time t. The Bellman recursion separates the first action from the decisions that follow:
Here, At(s) contains the allowed actions, and argmax returns a maximizing action. The quantity Qt(s,a) scores taking action a now and acting optimally afterward.
Calculate terminal values first, then work backward. At each state, average over uncertain next states before maximizing over the current action. After the transition, the next decision can use the newly observed state. To evaluate a specified policy instead, use its prescribed action in place of the maximum.
What to remember
- Retain enough information in the state to support the Markov property.
- A policy responds to observed states and may depend on time.
- Compare immediate reward plus discounted continuation value.
- Work backward from the stated terminal payoff.
- A larger expected return does not guarantee a larger reward on every run.
Example: Scheduling a Warehouse Robot
A warehouse robot has two shifts remaining. At each shift's start, its observed battery state is Ready or Depleted. It can Work or Recharge. The model below specifies immediate net rewards and next-state probabilities; no other history affects these outcomes.
Current state | Action | Immediate reward (credits) | Probability next Ready | Probability next Depleted |
|---|---|---|---|---|
Ready | Work | 8 | 0.5 | 0.5 |
Depleted | Work | 1 | 0 | 1 |
Either | Recharge | -1 | 1 | 0 |
Rewards are received immediately. Future rewards are discounted by 0.90 per shift, and there is no terminal payoff after the final shift. An action value is the expected discounted total reward from taking a specified action now and choosing optimally afterward. Write Vh(s) for the optimal value with h shifts remaining.
The next battery state is observed before the next action is chosen.
a) Find the optimal action and value in each battery state with one shift remaining.
Start at the horizon boundary. With no shifts remaining, the continuation value in either state is ________, because there is no terminal payoff:
For one remaining shift, each action's value is its immediate reward plus zero continuation. In Ready, compare Work's 8 credits with Recharge's −1 credit. In Depleted, compare Work's 1 credit with Recharge's −1 credit.
The optimal final-shift action is Work in either state. The corresponding values are 8 credits in Ready and 1 credit in Depleted.
b) Starting in Ready with two shifts remaining, calculate both action values and choose the better action.
For Work, average the one-shift values over the possible next states. The expected continuation before discounting is ________:
Its discounted contribution is ________. Add the immediate Work reward to obtain
Recharge guarantees Ready next shift, but costs one credit now:
Compare the complete action values, rather than immediate rewards alone. Choose Work, giving an optimal expected discounted value of 12.05 credits from Ready with two shifts remaining.
c) Starting in Depleted with two shifts remaining, calculate both action values. Explain why the best action differs from the one-shift choice.
Working in Depleted leaves the robot Depleted. Its next-shift value is 1 credit, whose discounted contribution is ________. Therefore,
Recharging guarantees Ready next shift. The discounted continuation contribution is ________, so
Choose Recharge, giving an optimal expected discounted value of 6.20 credits. With two shifts remaining, the improved next-shift reward compensates for the current cost. With only one shift remaining, no later operating reward is available, so Work is better. The physical state is unchanged, but the remaining horizon changes the decision.
A server controller considers an action that earns an immediate reward of 4 credits. After the action, the server reaches a busy state with probability 0.65 or an idle state with probability 0.35. Optimal continuation values at the next decision time are 18 credits and 6 credits, respectively. Using a discount factor of 0.90 per decision step, calculate this action's expected discounted total value in credits, to two decimal places.
A production controller observes a machine as Ready or Worn at the start of each shift. It chooses Run or Service. Rewards and next-state probabilities are given below. The next state is observed before the following choice. There is no discounting, no terminal payoff, and no other reward.
Current state | Action | Immediate reward (credits) | Probability next Ready | Probability next Worn |
|---|---|---|---|---|
Ready | Run | 9 | 0.6 | 0.4 |
Worn | Run | 3 | 0.2 | 0.8 |
Either | Service | -2 | 1 | 0 |
Complete the table with the optimal expected total reward and the best first action for each state and number of shifts remaining. Enter exact values in credits as integers or decimals with at most two decimal places. Enter Run or Service for each action.
| Shifts remaining | Current state | Optimal value (credits) | Best first action |
| 1 | Ready | ||
| 1 | Worn | ||
| 2 | Ready | ||
| 2 | Worn | ||
| 3 | Ready | ||
| 3 | Worn |