- Type
- Sequential decision problem in machine learning
- Origin
- Named after slot machines; studied since the 1930s
- Key algorithms
- Epsilon-greedy, UCB, Thompson sampling
- Applications
- A/B testing, advertising, clinical trials, recommendation systems
- Related
- Reinforcement learning, Markov decision process, Bayesian inference
- Type
- Sequential decision problem in machine learning
- Origin
- Named after slot machines; studied since the 1930s
- Key algorithms
- Epsilon-greedy, UCB, Thompson sampling
- Applications
- A/B testing, advertising, clinical trials, recommendation systems
- Related
- Reinforcement learning, Markov decision process, Bayesian inference
The multi-armed bandit problem is a classic problem in reinforcement learning in which an agent repeatedly chooses between a fixed set of options — called "arms", in reference to the levers of a slot machine — each returning a reward drawn from an unknown probability distribution, and must decide how to allocate its choices to maximise total reward over time.[1] It is the canonical formalisation of the exploration–exploitation trade-off: the agent must explore arms to learn their reward distributions while exploiting the arms that appear best, and the choices it makes affect only the rewards it collects, not the underlying distributions.[1]
Background
The problem takes its name from the image of a gambler facing multiple "one-armed bandits" (slot machines). A 1933 paper by W. R. Thompson proposed a Bayesian strategy — later named Thompson sampling — that chooses each arm according to its probability of being the best, making it one of the earliest formal solutions to the problem.[2] During the following decades the multi-armed bandit became a central object of study in statistics, operations research, and computer science, with contributions connecting it to stochastic scheduling and to the study of optimal decision making under uncertainty.[1]
The problem is a simplified form of reinforcement learning. In a full reinforcement learning setting, actions change the state of the environment and therefore the distribution of future rewards; in a bandit problem, each action yields an independent reward and does not affect the state, which makes the problem tractable to analyse rigorously while still capturing the core tension between exploration and exploitation.[1]
Key Concepts
A central measure of performance in multi-armed bandit research is regret, the difference between the cumulative reward collected by an algorithm and the reward that would have been collected by always playing the best arm. Fundamental lower bounds show that no algorithm can achieve regret smaller than a value proportional to the square root of the number of arms times the number of rounds, in the worst case.[3] Algorithms such as UCB (upper confidence bound) and Thompson sampling achieve near-optimal regret, growing only logarithmically with the number of rounds.[2][3]
Epsilon-greedy is the simplest family of strategies: with probability epsilon the agent chooses a random arm (exploration) and otherwise chooses the arm with the highest estimated reward (exploitation). Upper confidence bound (UCB) algorithms instead select the arm with the highest plausible upper bound on its reward, automatically exploring arms whose estimates are uncertain. Thompson sampling is a Bayesian method that samples from the posterior distribution of each arm's reward parameter and plays the arm that appears best in that sample, implementing a principle known as probability matching.[3] For stationary problems Thompson sampling and UCB are regarded as near-optimal, while variants such as discounted UCB and sliding-window Thompson sampling have been developed for settings where reward distributions change over time.[1]
Applications and Impact
Multi-armed bandit algorithms are widely used in industry wherever systems must choose between alternatives with unknown performance. They are commonly deployed as a more efficient alternative to classical A/B testing, dynamically shifting traffic toward better-performing variants instead of splitting traffic evenly, in applications such as website optimisation, online advertising, and recommendation systems.[4] Bandit methods are also used in clinical trials to allocate patients between treatments while minimising overall harm, and they appear as components of larger reinforcement learning systems.[3] Open-source libraries such as MABWiser and Vowpal Wabbit provide ready-made implementations of the main bandit strategies.[4]
>See Also
- Reinforcement Learning
- Q-Learning
- Markov Decision Process
- A/B Testing in Machine Learning
- Bayesian Inference
References
Multi-armed bandit techniques are relevant to Malaysian businesses that run digital experimentation, including e-commerce platforms such as Shopee and Lazada, which use adaptive testing and recommendation systems to optimise product rankings, promotions, and marketing campaigns.[4] Financial institutions in Malaysia, subject to guidance from Bank Negara Malaysia on the responsible use of AI, use bandit-style adaptive allocation in fraud detection and personalised offers, while the Malaysia Digital Economy Corporation (MDEC) supports local companies adopting data-driven optimisation.[5] For Malaysian organisations, bandit-based experimentation can improve on traditional A/B testing by reducing the traffic wasted on poorly performing variants, provided that the underlying data practices remain consistent with the Personal Data Protection Act (PDPA).
References
- ↑[Multi-armed bandit — Wikipedia](https://en.wikipedia.org/wiki/Multi-armed_bandit)
- ↑[Analysis of Thompson Sampling for the Multi-armed Bandit Problem — Agrawal and Goyal (PMLR, 2012)](https://proceedings.mlr.press/v23/agrawal12.html)
- ↑[The Multi-Armed Bandit Problem and Its Solutions — Lil'Log (Lilian Weng)](https://lilianweng.github.io/posts/2018-01-23-multi-armed-bandit)
- ↑[Beyond A/B Testing: Multi-Armed Bandits — DZone](https://dzone.com/articles/beyond-ab-testing-multi-armed-bandits)
- ↑[MDEC — Malaysia Digital Economy Corporation](https://mdec.my/)