# Architektura dueling: wartość stanu i przewaga akcji

EN: **Dueling network architecture** · id `duelingdqn` · aliases: Dueling DQN, dueling network, value–advantage decomposition, sieć dueling

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)](https://aiatlasgraph.com/t/qlearning.md) › Architektura dueling: wartość stanu i przewaga akcji

## Description

- PL: Architektura sieci Q z dwiema gałęziami: wartości stanu V(s) i przewagi akcji A(s,a), łączonymi w Q(s,a) bez zmiany algorytmu uczenia.
- EN: A Q-network architecture with two streams, state value V(s) and action advantage A(s,a), combined into Q(s,a) without changing the learning algorithm.

## In one sentence

- PL: Sposób budowy sieci, który osobno ocenia, jak dobra jest sytuacja, a osobno, o ile lepszy jest każdy ruch.
- EN: A way to build the network that separately judges how good a situation is and how much better each move is.

## Problem it solves

- PL: W wielu sytuacjach wybór ruchu prawie nie ma znaczenia, a program i tak marnuje wysiłek na ocenianie każdego z osobna.
- EN: In many situations the choice of move barely matters, yet the program wastes effort scoring each separately.

## What it does

- PL: Jak kierowca na pustej autostradzie: wie, że jest dobrze, niezależnie od pasa; uwagi na wybór pasa potrzeba dopiero w korku.
- EN: Like a driver on an empty motorway: things are fine whichever lane; lane choice matters only in traffic.

## Everyday example

- PL: Agent w grze wyścigowej szybko uczy się, które odcinki toru są bezpieczne, nawet gdy rzadko testował tam każdy skręt.
- EN: A racing-game agent quickly learns which track sections are safe, even without testing every turn there.

## This concerns you if you…

- PL: twój agent ma wiele podobnie dobrych ruchów
- PL: chcesz zrozumieć budowę popularnych agentów grających w gry
- EN: your agent has many similarly good moves
- EN: want to understand how popular game-playing agents are built

## Keywords

advantage stream · value stream · mean-subtracted advantage · Rainbow · Atari 2600

## How it works

- PL: Wspólny korpus sieci rozdziela się na dwie głowy. Jedna szacuje wartość stanu, druga przewagę każdej akcji; Q powstaje jako suma wartości i przewagi pomniejszonej o średnią przewagę, co zapewnia identyfikowalność. Wartość stanu uczy się z każdej aktualizacji, nawet gdy dotyczy ona jednej akcji.
- EN: A shared body splits into two heads. One estimates state value, the other each action's advantage; Q is the value plus the advantage minus its mean, ensuring identifiability. The state value learns from every update, even when only one action is updated.

## Limits

- PL: Pomaga głównie przy wielu akcjach o zbliżonej wartości; przy kilku wyraźnie różnych akcjach zysk bywa mały. Dotyczy dyskretnych akcji i nie zastępuje lepszej eksploracji ani stabilizacji treningu.
- EN: It helps mainly with many similarly valued actions; with a few clearly different actions gains can be small. It applies to discrete actions and does not replace better exploration or training stabilisation.

## Key terms

- PL: **przewaga (advantage)**: O ile dana akcja jest lepsza od przeciętnej w tym stanie.
- PL: **wartość stanu V(s)**: Oczekiwany wynik z danej sytuacji przy obecnej polityce.
- EN: **advantage**: How much better an action is than average in that state.
- EN: **state value V(s)**: Expected outcome from a situation under the current policy.

## Know first

- [Podstawy sieci neuronowych (Neural network fundamentals)](https://aiatlasgraph.com/t/neuralbasics.md)
- [Funkcje wartości i równanie Bellmana (Value functions and the Bellman equation)](https://aiatlasgraph.com/t/bellman.md)

## Sources

- [Rainbow: Combining Improvements in Deep Reinforcement Learning](<https://arxiv.org/abs/1710.02298>) `rainbow-2017` · by Matteo Hessel; Joseph Modayil; Hado van Hasselt; Tom Schaul; Georg Ostrovski; Will Dabney; Dan Horgan; Bilal Piot; Mohammad Azar; David Silver
- [Dueling Network Architectures for Deep Reinforcement Learning](<https://arxiv.org/abs/1511.06581>) `dueling-dqn-2015` · by Ziyu Wang; Tom Schaul; Matteo Hessel; Hado van Hasselt; Marc Lanctot; Nando de Freitas

---

AI Atlas revision 128 (2026-11-04) · HTML: https://aiatlasgraph.com/t/duelingdqn · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-11-04
