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.

MechanismWhy it helps
Replay bufferreuses transitions and reduces correlation between adjacent samples
Target networkmakes the bootstrap target less volatile
-greedy explorationsometimes tries non-greedy actions to discover better returns
Value output per actionturns 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

References