← Back to Reinforcement Learning Mind Map
🎮 Reinforcement LearningID: mab

Multi-Armed Bandit (MAB)

多臂老虎机 MAB
🎯Core Definition
The Multi-Armed Bandit (MAB) is a single-state, no-state-transition online decision problem: at each round pick an action ata_t among KK arms and observe a stochastic reward rtr_t (e.g., Bernoulli click rt∼Bernoulli(μat)r_t \sim \text{Bernoulli}(\mu_{a_t})). The core metric is regret: RT=Tμ∗−E[∑t=1Tμat]R_T = T\mu^* - \mathbb{E}[\sum_{t=1}^T \mu_{a_t}], where μ∗=max⁡aμa\mu^* = \max_a \mu_a is the best arm's mean — the expected gap between your total reward and always playing the optimal arm.
💡Use Cases
traffic allocation and cold-start in recsys/ads, an online alternative to A/B testing, AutoML hyperparameter search, clinical trials; in interviews it is the entry point for "RL with a single state" and the exploration-exploitation trade-off vs Q-Learning.
⚡Key Problems Solved
static A/B testing wastes samples on inferior variants via fixed split ratios; MAB adaptively shifts traffic toward good arms from live feedback, achieving the optimal O(ln⁡T)O(\ln T) regret with UCB/Thompson sampling (vs O(T)O(\sqrt{T}) in general), delivering significantly higher cumulative reward than uniform/random allocation under the same budget.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Multi-Armed Bandit (MAB).
Use Cases
In production engineering, what are the primary use cases for Multi-Armed Bandit (MAB) and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Write the regret definition and explain each term: why use the best arm's mean μ∗\mu^* instead of realized rewards?
2
Numerical: 3 arms with μ=(0.8,0.5,0.3)\mu=(0.8, 0.5, 0.3); over 100 rounds arm1 is chosen 60 times, arms 2/3 20 each — compute the regret?
3
How does MAB differ from full RL (MDP)? How does it degenerate from an MDP?
4
Core ideas and regret orders of ε-greedy, UCB, and Thompson sampling?
5
Lower bound: why is any algorithm's worst-case regret at least Ω(KT)\Omega(\sqrt{KT})?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Multi-Armed Bandit (MAB)"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardMulti-Agent RL (CTDE)Next Card →UCB1 (Upper Confidence Bound)

🔗 More Reinforcement Learning Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/RL/card/mab
中文速览与面试要点

多臂老虎机 MAB (Multi-Armed Bandit (MAB))

定义: 多臂老虎机 (Multi-Armed Bandit, MAB) 是单状态、无状态转移的在线决策问题:每轮从 K 个臂中选择一个动作 a_t,获得随机奖励 r_t(如 Bernoulli 点击 r_t Bernoulli( _a_t))。核心指标是 regret(遗憾):R_T = T ^* - E[ _t=1^T _a_t],其中 ^* = _a _a 是最优臂的期望奖励,即累计奖励相比"每轮都玩最优臂"的期望差距。 使用场景: 推荐/广告的流量分配与物料冷启动、A/B 测试的在线替代、AutoML 超参搜索、临床试验;面试中常作为"单状态 RL"对比 Q-Learning 的切入点,引出探索-利用权衡 (exploration-exploitation)。 解决的问题: 静态 A/B 测试按固定比例分配流量,劣方案浪费大量样本;MAB 根据实时反馈动态调整选择概率,以接近最优臂的频率玩好臂,UCB/Thompson 采样可达最优的 O( T) regret(一般算法为 O( T) 量级),相同预算下累计收益显著高于均匀/随机分配。

核心要点

  • 写出 regret 定义并解释每一项:为何用最优臂期望 ^* 而非实际收益?
  • 数值题:3 臂 =(0.8, 0.5, 0.3), 玩 100 轮, 臂1 被选 60 次、臂2/3 各 20 次, 计算 regret?
  • MAB 与完整 RL (MDP) 的差别?MAB 如何从 MDP 退化而来?
  • ε-greedy、UCB、Thompson 采样各自的核心思想与 regret 量级?
  • regret 下界:为什么任何算法的 worst-case regret 至少是 ( KT)?