Evaluation lab · San Francisco · London · Zürich
Reinforced Labs Request a briefing
Glossary

Epsilon-greedy

Also called: ε-greedy, epsilon greedy exploration, decaying epsilon

Epsilon-greedy picks the best-looking action with probability 1 − ε and a uniformly random action with probability ε, the simplest exploration rule in RL.

Epsilon-greedy is an exploration rule that, at each step, takes the action with the highest estimated value with probability and a uniformly random action with probability . It is the simplest way to stop a learning agent from committing too early to an action that only looks best.

Definition

With actions and value estimates , the policy is

The random branch can also pick the greedy action, which is why the greedy action's probability is . In an MDP the same rule is applied per state using a Q-function.

Worked example

We simulated the classic 10-armed Gaussian testbed: 2,000 seeded problems, arm means drawn from , rewards with unit noise, sample-average estimates, 1,000 steps. Over the last 100 steps, the share of steps choosing the truly best arm was:

  • (greedy): 36%, average reward 1.02
  • : 59%, average reward 1.30
  • : 80%, average reward 1.36

Greedy gets stuck early. A small finds the best arm slowly but would eventually exploit it more; with the agent can never pick the best arm more than of the time.

Limitations

  • Linear regret with a fixed : a constant fraction of steps is wasted forever. Decaying schedules such as fix this in theory but need tuning.
  • Undirected: it explores a clearly terrible action as often as a promising one. UCB and Thompson sampling direct exploration toward uncertain options.
  • Shallow in long horizons: independent random actions rarely produce the long, coordinated sequences needed to find a distant sparse reward.

Why it matters

Epsilon-greedy is the default exploration in Q-learning and deep Q-networks, usually annealed from 1.0 to around 0.01 or 0.1 early in training. It is easy to reason about, which makes it a good baseline. Its blind randomness is also why it is a poor fit wherever a random action could be costly or unsafe.

Sources

  1. Richard S. Sutton, Andrew G. Barto. Reinforcement Learning: An Introduction (2nd edition), 2018. incompleteideas.net

Know the number before you ship.

A 45-minute working session with an evaluation engineer. Bring one use case; leave with a threat model, a draft eval plan with sample sizes, and an honest read on where you stand.