An arm gives rewards , , in its first three pulls. Compute the estimate using (a) the sample-average update with step , and (b) a constant step size starting from . Why would you prefer (b) when the arm's reward distribution drifts over time?
Reinforcement learning, Multi-armed bandits
Level L2 Elementary. Length Short. Nature Mat Mathematical.
What's being asked
Whether you can use the incremental update and understand that a constant step size weights recent rewards more.
Key idea
The update is . With it is the exact sample mean. With constant it is an exponentially weighted average that forgets old rewards.
Steps
- (a) With step : . Then . Then .
- Check (a) against the mean: . It matches, so no reward history needs to be stored.
- (b) With and : , , .
- Unroll (b): . The weights decay geometrically with age.
- Conclude: if the true mean drifts (a non-stationary bandit), the sample average gives old rewards the same weight as new ones, while the constant step size tracks the change.
Common mistakes
- Using with counted from the wrong starting point, so the first update does not equal the first reward.
- Forgetting that a constant makes the estimate depend on the initial value , although with a weight that shrinks.
- Thinking a constant converges to the true mean. It keeps fluctuating, which is the price for tracking changes.
How long your answer should be
5–6 lines of arithmetic and one sentence of explanation.
Last checked on 4 December 2026.
Read this
Previous in Reinforcement learning: An agent has four actions with estimated values and uses -greedy with , where the random choice is uniform over all four actions. What is the probability of each action, and what is the expected estimated value of the chosen action?
Next in Reinforcement learning: In TD(0), the current estimate is . The agent moves from to with reward , and . With and , what are the TD target, the TD error and the updated ?