5.1.7 · D1Reinforcement Learning Foundations

Foundations — Exploration vs exploitation tradeoff

3,780 words17 min readBack to topic

Before we can read a single formula on the parent page, we need to build every symbol from the ground up. This page is a dictionary you can trust: nothing appears here that we haven't first drawn a picture for. We start with the story, then the vocabulary, then the numbers.


The story every symbol lives inside

Imagine a row of slot machines. Each machine has a lever ("arm") you can pull, and each pull spits out some reward — a number, maybe a coin, maybe nothing. You do not know which machine is generous. The only way to find out is to pull levers and watch.

This is the Multi-Armed Bandit — the simplest possible world in which the exploration/exploitation dilemma exists. Everything else on the parent page is a tool for playing this game well.

Figure s01 — the row of arms. Three slot machines stand side by side, each drawn in its own colour (arm 1 burnt orange, arm 2 teal, arm 3 plum). Above each lever is a "" mark: pulling that lever produces an unknown reward. This is the whole world we play in — refer back to it whenever a symbol names something in this picture.

Figure — Exploration vs exploitation tradeoff

Building the symbols, one at a time

Each block below gives a symbol: plain words → the picture → why the topic needs it. They are ordered so each one only uses symbols already defined above it.

and the action set

— the number of actions

and — step now vs. total steps

and — the reward, and the reward at step

and which action was chosen at a given step

— the true average reward of arm

Figure s02 — one arm's payout cloud. The teal curve is the spread of rewards a single arm can produce; the plum dashed line marks its true mean (the balance point of the cloud). The orange dots are a handful of actually observed rewards , and the orange dotted line is their average — our estimate , which wobbles near, but rarely exactly on, the true mean.

Figure — Exploration vs exploitation tradeoff

— the reward distribution of arm

— how wide an arm's payout cloud is

— how many times we've pulled arm

and — our estimate of an arm's value

and — the best arm and its value

— the expected value (average outcome)

Regret — the running score of our mistakes

Now every symbol in the parent's headline formula is defined, so we can finally read it:

Figure s03 — two shapes of regret. The orange curve is a straight ramp: a strategy that never corrects its mistakes keeps paying the same reward gap on every step, so its total regret grows in proportion to . The teal curve bends flat: a balanced strategy stops adding much regret once it has identified the best arm, so its total grows only like . The gap between the two curves is the value of being clever about exploration.

Figure — Exploration vs exploitation tradeoff

Reading the notation

, , — the tuning knobs

and — the "situation" and the policy


Two connected ideas you'll reuse

Recall Where the estimate

comes from (link to TD learning) The running average can be updated one reward at a time instead of re-summing everything. That incremental update is the seed of Temporal-Difference Learning — same "nudge your estimate toward the new evidence" spirit.

Recall Why too much exploitation resembles overfitting

Locking onto an arm after tiny evidence is like overfitting: you've trusted noise as if it were signal. Exploration plays the role of regularization — it keeps you humble about small samples.


The prerequisite map

Action a and set A of size K

Estimate Q of an arm

Reward r and spread p of r given a

True mean mu of an arm

Spread sigma of an arm

Best arm a-star and value mu-star

Count N gives standard error sigma over sqrt N

Regret over T steps

Exploration bonus

Exploration vs Exploitation

Expectation E over randomness

Epsilon-greedy UCB Thompson

Read it top-down: naming choices ( out of ) and rewards lets us estimate arm values; estimates plus true means define regret; counts and the spread create uncertainty (standard error ) and exploration bonuses; regret and bonuses together frame the tradeoff, which the three named strategies then resolve.


Equipment checklist

Test yourself — cover the right side and answer each before revealing.

What does the subscript in mean?
The reward that occurred on step ; subscripts are address labels, not multiplication.
What is the difference between and the set ?
is one chosen arm; is the whole menu of arms it is picked from, and counts them.
What is the difference between and ?
names a possible choice; is the arm actually chosen on round (e.g. means arm 2 was pulled on round 4).
What is the difference between and (i.e. )?
is the hidden true average of arm ; is our estimate built from observed rewards.
What does measure?
The spread (standard deviation) of an arm's payouts around its mean — the width of its reward cloud.
What happens to when ?
It is undefined (division by zero); we handle it with an initial value or by pulling each arm once first.
What does mean in this topic?
The number of available actions, — a count of the action set, not absolute value.
Difference between and ?
gives the largest value ; gives which arm achieves it.
How does the count translate into uncertainty?
The standard error of the estimate is , so the wobble shrinks like — a big count means a small wobble.
Is a fixed number or an expectation, and why?
An expectation — actions and rewards are random, so we average over all runs; linearity of expectation lets us write .
Why is regret better than ?
grows far slower than a straight line, meaning we stop making mistakes once we've learned the best arm.
What does control in epsilon-greedy?
The probability of exploring (choosing randomly) instead of exploiting the best current estimate.
What is the state in a plain bandit?
There is only one, unchanging state, so is constant and collapses to .
What does represent?
The policy — the probability of choosing action in situation ; the shared output of every strategy.