Back to Reinforcement Learning Mind Map
中文·English
🎮 Reinforcement LearningID: q-learning

Q-Learning (Off-Policy)

Q-Learning 离策略
🎯Core Definition
Q-Learning is a temporal-difference off-policy control algorithm that learns the optimal action-value function QQ^* directly, with update Q(s,a)Q(s,a)+α[r+γmaxaQ(s,a)Q(s,a)]Q(s,a) \leftarrow Q(s,a) + \alpha\left[ r + \gamma \max_{a'} Q(s',a') - Q(s,a) \right], where α\alpha is the learning rate, rr the immediate reward, γ\gamma the discount factor, ss' the resulting next state, and maxaQ(s,a)\max_{a'} Q(s',a') the greedy maximum over next-state actions (the target), the whole bracket being the TD error.It is off-policy: the behavior policy (how actions are sampled, e.g. ε\varepsilon-greedy) is separated from the target policy (what is learned, greedy max\max) — experience collected under any exploratory policy is used to optimize the greedy target π(s)=argmaxaQ(s,a)\pi(s) = \arg\max_a Q(s,a).Tabular convergence requires every (s,a)(s,a) visited infinitely often and step sizes satisfying the Robbins-Monro conditions tαt=,  tαt2<\sum_t \alpha_t = \infty,\; \sum_t \alpha_t^2 < \infty (e.g. αt=1/t\alpha_t = 1/t), giving QQQ \to Q^*.
💡Use Cases
model-free off-policy learning with known rewards — navigation, games, action optimization in recommendations; it is also the foundation of deep RL: DQN replaces the table with a network plus replay and target networks, and Double-DQN fixes the max overestimation of this algorithm.
Key Problems Solved
on-policy methods (e.g. SARSA) learn the value of the behavior policy itself and must explore under the current policy; Q-Learning's max\max operator points the TD target at the optimal policy, so historical experience from any behavior policy can be reused for faster learning, reaching QQ^* with one-step updates — the theoretical origin of off-policy learning (offline RL, experience replay).
🎯5 High-Frequency Exam Points
1
Write the Q-learning update in full and explain α, γ, the max term, and the TD error.
2
Why is Q-Learning off-policy? What are its behavior and target policies?
3
Convergence conditions for tabular Q-learning? What are the Robbins-Monro step-size conditions?
4
The overestimation problem caused by the max operator? How does Double Q-Learning fix it?
5
Q-Learning vs SARSA? How do they behave differently in the Cliff Walking environment?
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "Q-Learning (Off-Policy)"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardMC vs TD LearningNext CardExploration-Exploitation

🔗 More Reinforcement Learning Knowledge Cards

Actor-CriticBehavioral CloningContextual BanditCoT & Reasoning RL