# RL wspomagane demonstracjami (DQfD)

EN: **Reinforcement learning from demonstrations** · id `rlfromdemos` · aliases: reinforcement learning from demonstrations, RLfD, demonstration-augmented RL, uczenie ze wzmocnieniem z demonstracji

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Uczenie ze wzmocnieniem i decyzje](https://aiatlasgraph.com/t/decisions.md) › [Uczenie przez imitację](https://aiatlasgraph.com/t/imitation.md) › RL wspomagane demonstracjami (DQfD)

## Description

- PL: Łączenie niewielkiego zbioru demonstracji z uczeniem ze wzmocnieniem: demonstracje przyspieszają start i eksplorację, a nagroda pozwala poprawić się ponad demonstratora.
- EN: Combining a small demonstration set with reinforcement learning: demonstrations speed up the start and exploration, while reward allows improving beyond the demonstrator.

## In one sentence

- PL: Program podgląda kilka pokazów człowieka na start, a potem dalej uczy się sam na podstawie nagród, mogąc przerosnąć nauczyciela.
- EN: The program watches a few human demonstrations to start, then keeps learning from rewards and can surpass its teacher.

## Problem it solves

- PL: Agent uczący się od zera długo działa bardzo źle, a samo naśladowanie pokazów nie pozwala stać się lepszym od pokazującego.
- EN: An agent learning from scratch performs terribly for a long time, while pure imitation cannot surpass the demonstrator.

## What it does

- PL: Jak uczeń gry na gitarze: kilka lekcji z nauczycielem daje solidny start, a resztę dopracowuje, ćwicząc i słuchając efektów.
- EN: Like a guitar student: a few lessons give a solid start, and the rest comes from practising and listening to the results.

## Everyday example

- PL: Robot uczy się otwierać szuflady z kilku ręcznie pokazanych ruchów, a potem samodzielnie doskonali chwyt przez kolejne próby.
- EN: A robot learns to open drawers from a few hand-guided motions, then refines its grip through further trials.

## This concerns you if you…

- PL: masz kilka nagrań eksperta, ale chcesz wyników lepszych niż on
- PL: nie stać cię na długą naukę agenta od zera
- EN: you have a few expert recordings but want better than expert results
- EN: cannot afford a long from-scratch training run

## Keywords

DQfD · DDPGfD · demonstration replay · large-margin classification loss · prioritized replay · RLPD

## How it works

- PL: W DQfD agent jest wstępnie trenowany na demonstracjach z połączoną stratą: aktualizacje TD jedno- i wielokrokowe oraz strata marginesowa nagradzająca akcje demonstratora. Demonstracje zostają w buforze z priorytetowym odtwarzaniem, które samo reguluje ich udział. Podobne podejścia dosypują demonstracje do bufora metod aktor–krytyk w robotyce.
- EN: In DQfD the agent is pretrained on demonstrations with a combined loss: one-step and n-step TD updates plus a large-margin loss favouring the demonstrator's actions. Demonstrations stay in a prioritised replay buffer that regulates their share. Similar approaches add demonstrations to actor–critic buffers in robotics.

## Limits

- PL: Wymaga zarówno demonstracji, jak i funkcji nagrody oraz możliwości prób. Złe lub niespójne pokazy mogą wprowadzać w błąd, a zbyt silne trzymanie się demonstracji hamuje dalszą poprawę.
- EN: It needs demonstrations as well as a reward function and the ability to run trials. Poor or inconsistent demonstrations can mislead, and clinging too tightly to them slows further improvement.

## Key terms

- PL: **strata marginesowa**: Kara, gdy ocena innej akcji zbliża się do oceny akcji eksperta.
- PL: **wstępny trening**: Nauka na demonstracjach przed pierwszą samodzielną próbą agenta.
- EN: **large-margin loss**: A penalty when another action's score nears the expert action's score.
- EN: **pretraining**: Learning from demonstrations before the agent's first own trial.

## Know first

- [Klonowanie zachowań (behavioral cloning) (Behavioural cloning)](https://aiatlasgraph.com/t/behaviorcloning.md)
- [Q-learning i głębokie sieci Q (DQN) (Q-learning and deep Q-networks (DQN))](https://aiatlasgraph.com/t/qlearning.md)

## Related topics

Untyped, symmetric "see also" links.

- [Dostrajanie online po treningu offline (Offline-to-online RL fine-tuning)](https://aiatlasgraph.com/t/offlinetoonline.md)
- [Go-Explore: wróć do obiecującego miejsca, potem eksploruj (Go-Explore: return-then-explore)](https://aiatlasgraph.com/t/goexplore.md)

## Sources

- [Efficient Online Reinforcement Learning with Offline Data](<https://arxiv.org/abs/2302.02948>) `rlpd-2023` · by Philip J. Ball; Laura Smith; Ilya Kostrikov; Sergey Levine
- [Deep Q-learning from Demonstrations](<https://arxiv.org/abs/1704.03732>) `dqfd-2017` · by Todd Hester; Matej Vecerik; Olivier Pietquin; Marc Lanctot; Tom Schaul; Bilal Piot; Dan Horgan; John Quan; Andrew Sendonaris; Gabriel Dulac-Arnold; Ian Osband; John Agapiou; Joel Z. Leibo; Audrunas Gruslys

---

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