Skip to content
Back to Home
1989Paper

Q-learning Algorithm

Chris Watkins proposes Q-learning, becoming one of the most fundamental and widely used algorithms in reinforcement learning.

Overview

In 1989, Chris Watkins proposed the Q-learning algorithm in his Cambridge University doctoral thesis. This is a model-free reinforcement learning method where an agent learns optimal policies through interaction with the environment without needing a complete model. The core of Q-learning is maintaining an action-value function Q(s,a), representing the expected cumulative reward for taking action a in state s. The agent learns optimal policies by continuously updating Q values. Q-learning is simple yet powerful, becoming one of the cornerstones of reinforcement learning, later extended to deep reinforcement learning (DQN), widely applied in game AI, robot control, and decision systems.

Study Notes

Background, mechanics, impact, and key takeaways in one read

About 2 min read

Background & Context

Reinforcement learning studies how an agent learns to act through trial and error when rewards arrive only after a delay. Christopher Watkins developed Q-learning during his PhD research at King’s College, Cambridge; his 1989 thesis 'Learning from Delayed Rewards' introduced the algorithm and sketched a proof of convergence. It builds on Richard Bellman’s dynamic programming and Richard Sutton’s temporal-difference learning. The key breakthrough is that Q-learning is off-policy and model-free: the agent need not know the environment’s transition model, and can learn the optimal action-value function purely from interaction and rewards. Watkins and Peter Dayan gave a rigorous convergence proof in 1992 in the journal Machine Learning.

Key Points

  • 1Q-learning is a model-free, off-policy temporal-difference reinforcement-learning algorithm.
  • 2It learns the optimal action-value function Q(s,a), the expected long-run return of taking action a in state s.
  • 3Its update rule follows the Bellman optimality equation, blending immediate reward with the best future estimate.
  • 4The agent can explore randomly while still converging to the optimal policy, with no model of the environment.
  • 5Watkins and Dayan proved in 1992 that tabular Q-learning converges with probability one under standard conditions.

How It Works

Q-learning maintains a table Q(s,a) estimating the expected discounted return from taking action a in state s and then acting optimally afterward. After each step the agent observes reward r and next state s', and updates: Q(s,a) ← Q(s,a) + α [ r + γ·max_a' Q(s',a') − Q(s,a) ], where α is the learning rate and γ the discount factor between 0 and 1. The bracketed term is the temporal-difference error, the gap between the realized outcome and the old estimate. Intuitively, each update nudges the estimate toward 'reward plus best future value'. With sufficient exploration and a decaying learning rate, the table converges to the true optimal action-value function, from which the optimal action is simply the one with the highest Q.

Impact & Legacy

Q-learning became a cornerstone of model-free reinforcement learning, and its 'learn by trial and error' idea shaped three decades of research. In 2013-2015 DeepMind combined it with deep neural networks (DQN) to play Atari games directly from pixels, launching the deep-reinforcement-learning era. Its limits are clear: the tabular form only works for small state spaces, and convergence is sensitive to exploration and learning rate. In high-dimensional settings it requires function approximation, which can break the original guarantees.

Key Takeaways

  • The optimal policy follows from the action-value function, with no explicit model required.
  • The Bellman equation is the bridge between immediate reward and long-term value.
  • Off-policy learning lets an agent explore while still learning the optimum.
  • Moving from tables to deep networks was the leap that made RL practical at scale.

Glossary

Action-Value Function (Q)动作价值函数

Q(s,a) is the expected discounted return from taking action a in state s and then acting optimally.

Temporal-Difference (TD) Learning时序差分学习

A bootstrap method that learns by using the difference between the current estimate and a later estimate, the TD error.

Off-Policy离策略

A learning setup where the policy being improved can differ from the behavior policy that generated the data; Q-learning is off-policy.

Related Events