# Q-learning i głębokie sieci Q (DQN)

EN: **Q-learning and deep Q-networks (DQN)** · id `qlearning`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Uczenie ze wzmocnieniem i decyzje](https://aiatlasgraph.com/t/decisions.md) › [Algorytmy RL](https://aiatlasgraph.com/t/rlalgorithms.md) › Q-learning i głębokie sieci Q (DQN)

## Description

- PL: Uczenie wartości akcji z równania Bellmana w trybie off-policy; w DQN sieć neuronowa zastępuje tabelę Q. Metody tej rodziny wykorzystują ponownie dane z wcześniejszych interakcji, lecz trening z aproksymacją funkcji wymaga mechanizmów stabilizujących.
- EN: Off-policy learning of action values from the Bellman equation; in DQN a neural network replaces the Q-table. Methods in this family reuse data from past interactions, but training with function approximation needs stabilising mechanisms.

## In one sentence

- PL: To uczenie programu oceny możliwych ruchów, żeby wybierał te obiecujące lepszy dalszy wynik.
- EN: This teaches software to score possible moves so it can choose those promising better future outcomes.

## Problem it solves

- PL: Program nie wie, które działanie jest korzystne, zwłaszcza gdy jego ważne skutki pojawiają się dopiero później.
- EN: Software does not know which action is beneficial, especially when important consequences appear later.

## What it does

- PL: Poprawia oceny działań według uzyskanej nagrody i przewidywanej wartości następnych ruchów; może zapisywać oceny w tabeli lub wyuczonym modelu.
- EN: It updates action scores using received rewards and predicted future move values, storing scores in a table or learned model.

## Everyday example

- PL: Postać w grze uczy się, które przejście prowadzi do celu, korzystając także z zapisanych wyników wcześniejszych prób.
- EN: A game character learns which passage leads towards the goal, also using recorded outcomes from earlier trials.

## This concerns you if you…

- PL: chcesz wybierać ruchy przez porównanie ich ocen
- PL: masz doświadczenia, które można wykorzystać ponownie do nauki
- EN: want to choose moves by comparing their scores
- EN: have experiences that can be reused for learning

## Keywords

experience replay · target networks · Double DQN · Dueling DQN · epsilon-greedy exploration

## How it works

- PL: Wartość działania aktualizuje się ku nagrodzie i zdyskontowanej najlepszej wartości w następnym stanie. Głęboki wariant dopasowuje sieć do tych celów, zwykle wykorzystując bufor doświadczeń i opóźnioną sieć docelową.
- EN: Action values are updated toward reward plus the discounted best next-state value. The deep variant fits a network to these targets, commonly using experience replay and a delayed target network.

## Limits

- PL: Maksymalizacja zaszumionych ocen może zawyżać wartości. Aproksymacja siecią, bootstrapping i uczenie off-policy mogą destabilizować trening; przeszukiwanie wszystkich działań jest trudne dla akcji ciągłych.
- EN: Maximising noisy estimates can overestimate values. Neural approximation, bootstrapping and off-policy learning can destabilise training; searching all actions is difficult in continuous spaces.

## Key terms

- PL: **funkcja Q**: Oczekiwany zwrot po wykonaniu działania w danym stanie.
- PL: **experience replay**: Ponowne próbkowanie zapisanych przejść do aktualizacji modelu.
- EN: **Q function**: Expected return after taking an action in a given state.
- EN: **experience replay**: Resampling stored transitions to update the model.

## Know first

- [Funkcje wartości i równanie Bellmana (Value functions and the Bellman equation)](https://aiatlasgraph.com/t/bellman.md)
- [Propagacja wsteczna (backpropagation) (Backpropagation)](https://aiatlasgraph.com/t/backprop.md)

## Examples

- PL: Tabelaryczny Q-learning · DQN · bufor doświadczeń (replay) · sieć docelowa · Double DQN
- EN: Tabular Q-learning · DQN · experience replay · target network · Double DQN

## Related topics

Untyped, symmetric "see also" links.

- [Konserwatywne offline RL (CQL, IQL) (Conservative offline RL)](https://aiatlasgraph.com/t/conservativeoffline.md)
- [Uczenie z różnic czasowych (TD) i metody Monte Carlo (Temporal-difference learning and Monte Carlo methods)](https://aiatlasgraph.com/t/tdlearning.md)
- [Uczące się systemy klasyfikatorów (ewolucja reguł „jeśli–to”) (Learning classifier systems (LCS))](https://aiatlasgraph.com/t/lcs.md)

## Sources

- [Berkeley CS185/285 · Deep Reinforcement Learning (2026)](<https://rail.eecs.berkeley.edu/deeprlcourse/>) `rl` · reference: Uczenie przez wzmacnianie, imitacja, sterowanie i RL dla LLM.
- [OpenAI Spinning Up — Part 2: Kinds of RL Algorithms](<https://spinningup.openai.com/en/latest/spinningup/rl_intro2.html>) `spinningup-rl-taxonomy` · by Joshua Achiam / OpenAI
- [Hugging Face Deep Reinforcement Learning Course — unit list](<https://huggingface.co/learn/deep-rl-course/unit0/introduction>) `hf-deep-rl-course` · by Hugging Face
- [Playing Atari with Deep Reinforcement Learning](<https://arxiv.org/abs/1312.5602>) `dqn-atari-2013` · by V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, M. Riedmiller

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/qlearning · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
