The exploration-exploitation dilemma is the trade-off an agent faces between trying unknown actions to gather information and exploiting the currently best action for reward — the two cannot be maximized simultaneously, and optimal exploration should be allocated by information gain. The simplest strategy is ε-greedy: with probability 1−ε pick the greedy action and with probability ε explore uniformly, so the greedy action is chosen with π(a∣s)=1−ε+∣A∣ε and every other action with ∣A∣ε; ε is annealed (e.g. from 1.0 to 0.01), guaranteeing infinite exploration of every action so algorithms like Q-learning can converge. A better optimistic strategy is UCB1: at=argmaxa[μ^a+na2lnt], where μ^a is the empirical mean reward of action a, na its visit count, and t the total steps — the confidence bound shrinks as na grows, balancing exploration and exploitation through "optimism in the face of uncertainty", achieving regret RT=∑t=1T(μ∗−μat) of O(lnT) on multi-armed bandits.
💡Use Cases
all online learning — multi-armed bandits, A/B and online decisions in recommendation/advertising, RL training (ε annealing, optimistic initialization), and RLHF sampling (needs diverse data); interviews often compare ε-greedy vs UCB vs Thompson sampling.
⚡Key Problems Solved
pure exploitation gets stuck in local optima (untried actions are underestimated) while pure exploration wastes reward; ε-greedy is simple but wastes linearly (always explores with a fixed random probability), whereas UCB/Thompson sampling weight exploration by uncertainty, cutting regret to logarithmic — exploration is paying for future information, so actions with high information gain deserve exploration first.
🎯5 High-Frequency Exam Points
1
Write the ε-greedy policy formula and explain why the greedy action gets 1-ε+ε/|A|.
2
Write the UCB1 selection formula and explain each term. Why does √(2ln t/n_a) shrink with n_a?
3
Compare ε-greedy, UCB, and Thompson sampling: exploration logic, regret bounds, use cases.
4
What is regret? Why does UCB achieve O(ln T) regret on MABs?
5
Why should optimal exploration be allocated by information gain? Other exploration tricks in RL (optimistic init, count-based bonuses)?