Can Yalnız
RL · demo

A little exploration beats pure greed on a 10-armed bandit

Sample demo. Pick ε and watch average reward diverge from the greedy policy on the classic 10-armed testbed.

  • Observable Plot
  • TypeScript

Each run draws 10 arm means from N(0,1)\mathcal{N}(0, 1); rewards are the arm mean plus N(0,1)\mathcal{N}(0, 1) noise. The agent keeps sample-average estimates and acts greedily with probability 1−ε1 - \varepsilon.

Fig. 1Even ε = 0.1 overtakes greedy within a few hundred steps
Average reward per step over independent runs of the 10-armed Gaussian testbed, 1,000 steps each. Seed 7, so results are reproducible.
source: in-browser simulation

Greedy locks onto whichever arm looked good first. Small ε keeps sampling the others often enough to find the best one.