Each arm hides a payout probability. How do you balance explore vs exploit? The classic problem behind Thompson Sampling, UCB1 and ε-greedy.
(no pulls yet)
Keys: 1–K to pull an arm / R for a new game
Progress
pulls left
50 / 50
total reward
0
optimal (theory)
0.0
cumulative regret
0.00
K-armed Bandit: Each arm has a hidden win probability p_i; every turn you choose which to pull. Explore = gather info (find out which is best); exploit = pull the current best-looking one. Balancing the two is the whole game. The Simulation tab compares ε-greedy / UCB1 / Thompson Sampling.
Each strategy simulated independently on the same probs.
This tab: Each strategy simulated independently on the same probs.
Optimal: cheats — always the best arm (regret lower bound = 0)
Thompson sampling: Bayesian sampling (best in practice)
UCB1: optimistic upper-confidence-bound choice
ε-greedy: explore randomly with prob ε, else empirical best
Greedy: pull each once, then always the empirical best (can miss)
Random: uniformly random every turn
The slope of cumulative regret (gap vs optimal) shows the "smartness" at a glance: Thompson and UCB1 grow logarithmically, Random diverges linearly.