Exploration vs. Exploitation
A Q-table starts with guesses. If the agent always chooses the action with the highest current Q-value, an early lucky or unlucky sample can lock behavior into a bad pattern. The agent may never try the action that would have been better.
Exploitation uses what the agent currently believes is best. Exploration tries actions to gather information. RL agents need both: exploiting too early can trap learning, but exploring forever ignores useful evidence.
Exploration vs exploitation
How epsilon changes behavior
A lunch robot has learned that sandwiches look safest. Soup is under-tested, but it is actually the best option. Choose epsilon to see what the next 20 decisions look like.
🥪
Q = 0.8
best current Q
🍲
Q = 0.0
under-tested
🥗
Q = 0.2
okay
🥤
Q = -0.1
usually bad
explore
4/20
exploit
16/20
🍲 tries
1
sample return
11.2
random
r +1.0
greedy
r +0.6
greedy
r +0.6
greedy
r +0.6
greedy
r +0.6
random
r +0.6
greedy
r +0.6
greedy
r +0.6
greedy
r +0.6
greedy
r +0.6
random
r -0.2
greedy
r +0.6
greedy
r +0.6
greedy
r +0.6
greedy
r +0.6
greedy
r +0.6
greedy
r +0.6
random
r +0.2
greedy
r +0.6
greedy
r +0.6
A common compromise is an -greedy policy:
When , the agent is fully greedy. When , every action is random. Most practical settings use something in between, often with changing over training.
The Best-Looking Action Can Be A Trap
A high current Q-value means "best according to current evidence." Exploration exists because the table may be wrong early in training.
In an -greedy policy, what happens with probability ?