Reinforcement Learning Lab

Eight reinforcement-learning labs: classical, deep, policy optimisation, bandits, planning and multi-agent, with experiments trained for real in your browser.

39interactive experiments

Multi-armed bandits and regret

Multi-Armed Bandits · bandits

Learning objectives

  • Define cumulative regret.
  • Compare ε-greedy with the other strategies.

The idea

A bandit is the simplest RL problem: one state and several actions (arms), each with an unknown reward distribution.

Explanation

There are no following states, so one question remains: how to split pulls between exploration and exploitation. Performance is measured by regret: the difference between what always pulling the best arm would have earned and what we actually earned.

Equations

R_T=\sum_{t=1}^{T}(\mu^*-\mu_{A_t}),\qquad \mu^*=\max_a\mu_a

Regret needs the hidden μ*, known only in simulation.

Worked example

In the test bed: ten Gaussian arms and four strategies compared over 300 runs.

Common mistakes

Judging from a single run.

Reporting regret on real data where the best is unknown.

Summary

Bandits isolate the exploration problem; cumulative regret evaluates them.

Related experiments

Assessment questions

References

  1. Sutton, R. S.; Barto, A. G. (1998). Reinforcement learning: an introduction (first-edition record; the second edition is free at the author's page). IEEE Transactions on Neural Networks 9(5):1054. doi:10.1109/tnn.1998.712192
  2. Auer, P.; Cesa-Bianchi, N.; Fischer, P. (2002). Finite-time analysis of the multiarmed bandit problem. Machine Learning 47:235-256. doi:10.1023/a:1013689704352