Skip to main content
Interactive 3D/Multi-Armed Bandit Explorer
Multi-Armed Bandit Simulator
Arm A
True rate (hidden): 30%
Observed: -%
95% CI: ±50.0%
Pulls: 0Wins: 0
Arm B
True rate (hidden): 55%
Observed: -%
95% CI: ±50.0%
Pulls: 0Wins: 0
Arm C
True rate (hidden): 45%
Observed: -%
95% CI: ±50.0%
Pulls: 0Wins: 0
Arm DBEST
True rate (hidden): 70%
Observed: -%
95% CI: ±50.0%
Pulls: 0Wins: 0
Total Pulls
0
Avg Reward Rate
0.0%
Cumulative Regret
0.0
Bandit Explorer
Find the best arm while minimizing regret
Strategy
Epsilon (ε)
ε = 0.1010% explore
How It Works
ε-Greedy: explore randomly ε% of the time, exploit best arm otherwise.

UCB1: add confidence bonus to uncertain arms - balances exploration mathematically.

Thompson: sample from Beta distribution - probabilistic exploration.

Multi-Armed Bandit Explorer - Interactive Visualization

The multi-armed bandit problem formalizes the exploration-exploitation tradeoff: you have N options with unknown reward rates, and must decide each round whether to try a new option or exploit the best one you know. Epsilon-greedy explores randomly with probability ε. UCB1 adds a confidence bonus to uncertain arms - arms with fewer pulls get a higher score. Thompson Sampling maintains a Beta distribution over each arm's true reward rate and samples from it, achieving near-optimal regret with no hyperparameter tuning.

  • Watch ε-greedy balance random exploration against greedy exploitation - set ε=0 for pure greedy, ε=1 for pure random
  • See UCB1 pull uncertain arms first, then converge to the best arm as confidence intervals shrink
  • Observe Thompson Sampling probabilistically explore proportional to uncertainty - it naturally reduces exploration as data accumulates
  • Track cumulative regret (how much reward was missed vs always picking the best arm) across all three strategies

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.