After t=10 total pulls, a three-armed bandit with rewards in [0,1] has pull counts n=(5,3,2) and sample means μ^=(0.6,0.5,0.4). Which arm does UCB1 pull next, using the index μ^i+2ln⁡t/ni? What would a greedy agent do?

Reinforcement learning, Multi-armed bandits
Level L2 Elementary. Length Short. Nature Mat Mathematical.

What's being asked

Whether you can compute upper confidence bounds and see that the bonus favours rarely tried arms.

Key idea

UCB1 pulls the arm with the largest "optimistic" index μ^i+2ln⁡t/ni. The bonus is large for arms that have been tried few times, so uncertain arms get another chance.

Steps

  1. Compute 2ln⁡t=2ln⁡10=4.605.
  2. Arm 1: bonus 4.605/5=0.921=0.960, index 0.6+0.960=1.560.
  3. Arm 2: bonus 4.605/3=1.535=1.239, index 0.5+1.239=1.739.
  4. Arm 3: bonus 4.605/2=2.303=1.517, index 0.4+1.517=1.917.
  5. Decision and long-run behaviour: UCB1 pulls arm 3, which has the lowest mean but the fewest pulls, whereas a greedy agent pulls arm 1 (0.6). Because ln⁡t grows slowly, every arm is revisited occasionally while suboptimal arms are pulled only about O(ln⁡t) times.

Common mistakes

How long your answer should be

5–6 lines.

Read this

Previous in Reinforcement learning: A corridor has three non-terminal cells 1, 2, 3 in a row, with a terminal cell L to the left of cell 1 and a terminal cell R to the right of cell 3. The policy moves left or right with probability 0.5 each. Moving into R gives reward +1, and every other move gives reward 0. With γ=1 and V0=0, compute V1,V2,V3 (synchronous sweeps) for cells 1, 2, 3. What do the values converge to?
Next in Reinforcement learning: A deterministic world has a terminal goal G and two states A and B, each with one action, "right". Right from B gives reward 1 and ends at G. Right from A gives reward 0 and moves to B. Start with Q=0 everywhere, α=0.5, γ=0.9. The agent experiences (B,right,1,G) and then (A,right,0,B), each with one Q-learning update, and stores them in a model. Then Dyna-Q does two planning updates, replaying (B,right) first and (A,right) second. What are Q(A,right) and Q(B,right) after each stage, and what did planning achieve?