Multi-Armed Bandits
Optimizing online decision-making when actions yield stochastic rewards without full sequential state transitions.
A Multi-Armed Bandit (MAB) is a simplified Reinforcement Learning framework where an agent chooses among K independent actions ("arms") to maximize cumulative reward. Unlike full MDPs, bandits have no state transitions—each action choice is stateless and independent. MABs replace traditional static A/B testing in digital marketing, ad click optimization, and website UI layout experiments by dynamically routing traffic to high-performing variations while continuously testing alternatives.
Multi-Armed Bandit vs Full MDP
FULL MARKOV DECISION PROCESS (MDP) MULTI-ARMED BANDIT (MAB)
State s_t ──► Action a_t ──► Reward r_{t+1} Action a_t ──► Reward r_t (Stateless!)
└──────► Next State s_{t+1}
Multi-Armed Bandits are Stateless Single-Step MDPs:
- No state transitions .
- Focuses entirely on finding the optimal arm among candidate choices under stochastic reward distributions .
Why Bandits Replace Static A/B Testing
STATIC A/B TEST (Fixed 50/50 Allocation for 14 Days):
Variation A (Winning): 50% Traffic ──► 10,000 Conversions
Variation B (Losing): 50% Traffic ──► 2,000 Conversions <-- Wasted 50% traffic on losing B!
BANDIT ALGORITHM (Dynamic Traffic Allocation):
Day 1: 50% A / 50% B ──► Day 3: 75% A / 25% B ──► Day 7: 95% A / 5% B
Minimizes Opportunity Cost & Cumulative Regret!
Regret Bounds
Let be the expected reward of the true optimal arm.
Suboptimal arm gap .
- Naive Random Search: Regret scales linearly (infinite opportunity cost).
- Optimal Bandit (UCB / Thompson): Regret scales logarithmically (Lai & Robbins lower bound).
Say this out loud
"Multi-Armed Bandits model stateless decision-making across K choices to maximize cumulative reward. Bandits replace static A/B testing by dynamically routing traffic to winning variations in real-time, minimizing cumulative regret. Optimal algorithms like Thompson Sampling and UCB achieve logarithmic O(ln T) regret bounds."
Follow-ups to expect
- What is Non-Stationary Bandit? A bandit setting where arm reward distributions change over time (e.g., news trends). Solved using Discounted UCB or Sliding-Window Thompson Sampling, giving higher weight to recent observations.
- What is Contextual Bandit? A bandit extension where action rewards depend on an observed user context vector (e.g. user age, location, device), bridging MABs and full RL recommendation engines.
Check yourself
Question 1 of 3
Why are Multi-Armed Bandits (MAB) superior to traditional static A/B testing for real-time website UI optimization?