Q-Learning and DQN
Q-learning is a value-based control method. It learns , the expected return after taking action in state and then acting well afterward. A policy can then choose the action with the largest estimated value.
Tabular Update
For a transition , tabular Q-learning updates
The bracketed term is the temporal-difference error. It compares the current estimate with a one-step bootstrap target.
Worked Calculation
Assume , reward , discount , next-state best action value , and learning rate . The target is
The temporal-difference error is , so the updated value is
The estimate moves toward the better-than-expected transition but does not jump all the way because the learning rate is .
Deep Q-Networks
DQN replaces a table with a neural network . For high-dimensional observations such as images, the network maps the observation to one value per action. The usual squared Bellman loss is
where are target-network parameters held fixed for several updates. DQN also uses experience replay: transitions are stored and sampled later so training batches are less correlated.
| Mechanism | Why it helps |
|---|---|
| Replay buffer | reuses transitions and reduces correlation between adjacent samples |
| Target network | makes the bootstrap target less volatile |
| -greedy exploration | sometimes tries non-greedy actions to discover better returns |
| Value output per action | turns action selection into an argmax over predicted values |
Caveats
Value-based methods fit naturally when the action set is discrete. Continuous control often needs policy-gradient or actor-critic methods. DQN can also overestimate values because the same estimates select and evaluate actions; variants such as Double DQN reduce this bias.
Connections
- Value Functions and Bellman Equations define the target Q-learning tries to satisfy.
- Policy Gradients and Actor-Critic Methods are often better suited to continuous actions and stochastic policies.
- Offline and Model-Based RL adds stronger constraints when the data comes from a fixed logged dataset.
References
- Watkins and Dayan, 1992, Q-learning
- Mnih et al., 2013, Playing Atari with Deep Reinforcement Learning
- van Hasselt et al., 2015, Deep Reinforcement Learning with Double Q-learning
Nav