The simplest reinforcement learning setting: actions (“arms”), each giving stochastic reward from its own fixed distribution.

There are no states or consequences beyond the immediate reward.
It isolates the exploration vs exploitation problem: estimate each action’s value from the rewards received, and balance exploiting the best-looking arm against gathering information about the others.

… estimate of an action’s value after it was selected times (the average of those rewards)
… reward received after the th selection of this action

computed incrementally as an error-driven update with step size :

Simple epsilon greedy bandit algorithm

Initialize, for to :


Loop forever:

Optimistic initial values

Set the initial value estimates high for all actions: even a purely greedy agent then explores every arm at first, since each real reward disappoints relative to the estimate and untried arms keep looking best. Works well on stationary problems. But as soon as the optimal actions change a little, you’re out of luck, like with all tricks that focus on initial values:

The beginning of time occurs only once, and thus we should not focus on it too much