ECE 57000 — November 20, 2026
Today: finish exploration, then follow actions that change the next decision.
C has the highest estimated play rate. E has had few impressions. When is trying E most valuable?
A. Many similar viewers will arrive.
B. All six banners will be replaced tomorrow, before the next viewer.
C. This is the final viewer.
A. Exploration has value when information can improve future decisions. A longer horizon gives the learner more chances to use what it learns.
Share of choices going to E across rounds for five policies.
Early trials can correct a misleading estimate. Uniform sampling keeps choosing E about once every six rounds.
| Time | Event | Reward for showing E | E plays / completed trials |
|---|---|---|---|
| 4:00 | Show E | Pending | 10/100 |
| 4:03 | No play yet | Pending | 10/100 |
| 4:08 | Viewer presses play | 1 | 11/101 |
If the ten-minute window had closed without a play, the update would be 10/101.
Feedback delay changes when an estimate can be updated. With one action per viewer, the eventual reward still has a known action to evaluate.
What if we know more about the viewer? What if the banner changes what the viewer can do next?
Suppose half the viewers are new and half are returning. Before showing a banner, we learn which group the viewer belongs to.
| Hypothetical play rate | Banner C | Banner E |
|---|---|---|
| New viewer | 14% | 6% |
| Returning viewer | 6% | 18% |
| All viewers | 10% | 12% |
Always showing E gives 12 plays per 100 viewers on average. Showing C to new viewers and E to returning viewers gives 7 + 9 = 16.
Context changes which action has the highest expected reward. The learner still makes one choice per viewer and observes only that choice’s reward.
Now the viewer can open the title page. Netflix chooses a trailer only if the page opens. A play still earns 1.
| Possible path after showing C | Next decision | Final reward |
|---|---|---|
| Viewer leaves | Visit ends | 0 |
| Viewer opens the page | Show the action trailer → viewer leaves | 0 |
| Viewer opens the page | Show the comedy trailer → viewer plays | 1 |
To judge banner C, we need to know how often it gets viewers to the page and what happens under the trailer policy once they arrive.
Sequential RL tracks how actions change the next state. An action’s value includes rewards earned after later decisions.
Suppose a viewer sees banner E, opens the title page, watches the comedy trailer and presses play.
| Step | State before the choice | Action Netflix takes | Next state | Reward |
|---|---|---|---|---|
| 0 | Browsing | Show E | On title page | 0 |
| 1 | On title page | Show comedy trailer | Visit ended | 1 |
The viewer’s response determines where the visit goes. A viewer who leaves after E ends the visit at step 0 with reward 0.
A trajectory records the interaction in order. From state \(\textnormal{S}_t\), the agent chooses \(\textnormal{A}_t\), then observes \(\textnormal{S}_{t+1}\) and \(\textnormal{R}_{t+1}\).
Two viewers reach the same title page, one through C and one through E. Both see the comedy trailer.
| Suppose earlier artwork… | What state would we use on the page? |
|---|---|
| Has no further effect on how viewers respond | On title page can describe both visits. |
| Still affects which trailer a viewer responds to | Keep on title page after C and on title page after E distinct. |
The Markov assumption says that given the current state and action, earlier history adds no information about the distribution of the next state and reward.
① Our choice · Browsing → show E. On the page → choose comedy with probability ½, otherwise action.
② Viewer response · After E, 30% reach the page and 70% leave. Either outcome earns 0 immediately.
③ Reward and next state · Both trailers end the visit. Comedy earns a play with probability 0.50 and action with probability 0.40.
Start with \(S_0\sim\rho_0\), where \(\rho_0(s)\) is the probability of starting in state \(s\). Here every visit starts in browsing.
① The agent controls the policy \(\pi(a\mid s)=\Pr(A_t=a\mid S_t=s)\).
②③ The environment supplies the dynamics \(p(s',r\mid s,a)=\Pr(S_{t+1}=s',R_{t+1}=r\mid S_t=s,A_t=a)\).
The MDP specifies states, available actions and environment dynamics. Choosing a policy determines how the agent interacts with it.
\[S_0 \xrightarrow{\pi} A_0 \xrightarrow{p} (R_1,S_1) \xrightarrow{\pi} A_1 \xrightarrow{p} (R_2,S_2)\longrightarrow\cdots\]
① The current state determines which action distribution to use.
② The current state and chosen action determine the next outcome distribution.
③ The next state and reward are drawn jointly. The next state becomes the input for the following choice.
An episode stops at a terminal state. A continuing task can generate an infinite sequence.
Path: browsing → E → page (0) → comedy → ended (1).
\[\begin{aligned} \Pr(\text{this path})={}&\rho_0(\text{browsing})\,\pi(E\mid\text{browsing})\,p(\text{page},0\mid\text{browsing},E)\\ &\times\pi(\text{comedy}\mid\text{page})\,p(\text{ended},1\mid\text{page},\text{comedy})\\ ={}&1\times1\times0.30\times0.50\times0.50=0.075. \end{aligned}\]
About 7.5% of visits follow this exact path. Plays after the action trailer follow another path.
The return from time \(t\) is the discounted sum of future rewards: \[G_t=\sum_{k=0}^{T-t-1}\gamma^k R_{t+k+1},\qquad \pi^*\in\arg\max_\pi\mathbb E_{S_0\sim\rho_0,\,\pi,\,p}[G_0].\]
Which trailer policy earns more plays? With \(\gamma=1\), always showing comedy earns \(0.30(0.50)=0.15\) expected plays per visit. Mixing trailers equally earns \(0.30[0.5(0.50)+0.5(0.40)]=0.135\).
Discount sets the weight on later rewards. Bounded episodes can use \(\gamma=1\). For continuing tasks with bounded rewards, \(0\le\gamma<1\) guarantees a finite discounted sum.