# Bufor doświadczeń i priorytetowe odtwarzanie

EN: **Experience replay and prioritised replay** · id `experiencereplay` · aliases: experience replay, replay buffer, prioritized experience replay, PER, bufor powtórek

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) › Bufor doświadczeń i priorytetowe odtwarzanie

## Description

- PL: Mechanizm przechowywania przejść do wielokrotnego uczenia off-policy; wersja priorytetowa częściej odtwarza bardziej pouczające doświadczenia.
- EN: A mechanism that stores transitions for repeated off-policy learning; prioritised replay samples more informative experiences more often.

## In one sentence

- PL: Agent zapisuje swoje dawne próby i wielokrotnie się na nich uczy, częściej wracając do tych najbardziej pouczających.
- EN: An agent stores its past attempts and learns from them repeatedly, returning more often to the most instructive ones.

## Problem it solves

- PL: Każda próba w środowisku kosztuje, a uczenie tylko na najnowszych, podobnych do siebie chwilach jest niestabilne i marnotrawne.
- EN: Every trial in the environment costs something, and learning only from the latest, similar moments is unstable and wasteful.

## What it does

- PL: Jak uczeń, który przegląda zeszyt błędów i najczęściej powtarza zadania, które najbardziej go zaskoczyły.
- EN: Like a student reviewing a mistakes notebook, most often redoing the problems that surprised them most.

## Everyday example

- PL: Program uczący się gier wideo wraca do zapisanych chwil tuż przed utratą życia, bo z nich uczy się najwięcej.
- EN: A program learning video games revisits stored moments just before losing a life, because it learns most from them.

## This concerns you if you…

- PL: próby w twoim środowisku są drogie lub powolne
- PL: chcesz zrozumieć, jak działają klasyczne agenty do gier
- EN: trials in your environment are costly or slow
- EN: you want to understand how classic game agents work

## Keywords

prioritized experience replay · Rainbow · Double DQN · dueling DQN · n-step returns · noisy nets · hindsight experience replay · Atari 100k

## How it works

- PL: Przejścia (stan, akcja, nagroda, następny stan) trafiają do bufora, z którego losuje się minipartie, co rozbija korelacje czasowe. Prioritized replay losuje częściej przejścia o dużym błędzie TD i koryguje obciążenie wagami ważności. Rainbow łączy podwójne Q, PER, sieci dueling, zwroty wielokrokowe, RL rozkładowe i noisy nets.
- EN: Transitions (state, action, reward, next state) go into a buffer from which minibatches are sampled, breaking temporal correlations. Prioritised replay samples high-TD-error transitions more often and corrects the bias with importance weights. Rainbow combines double Q, PER, dueling networks, multi-step returns, distributional RL and noisy nets.

## Limits

- PL: Dane z bufora pochodzą ze starszych polityk, więc działa to głównie z metodami off-policy. Silna priorytetyzacja zwiększa niestabilność, a duży bufor kosztuje pamięć.
- EN: Buffer data comes from older policies, so it mainly suits off-policy methods. Strong prioritisation increases instability, and large buffers cost memory.

## Key terms

- PL: **TD error**: Różnica między przewidywaną a poprawioną oceną; miara zaskoczenia.
- PL: **importance sampling weights**: Wagi korygujące skrzywienie wynikające z nierównego losowania danych.
- PL: **dueling network**: Sieć osobno ocenia stan i przewagę każdej akcji.
- EN: **TD error**: Gap between predicted and updated value; a measure of surprise.
- EN: **importance sampling weights**: Weights correcting the skew from uneven data sampling.
- EN: **dueling network**: A network that scores the state and each action's advantage separately.

## Know first

- [Uczenie z różnic czasowych (TD) i metody Monte Carlo (Temporal-difference learning and Monte Carlo methods)](https://aiatlasgraph.com/t/tdlearning.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.

- [Uczenie z celami i odtwarzanie z perspektywy czasu (HER) (Goal-conditioned RL and hindsight experience replay)](https://aiatlasgraph.com/t/goalconditioned.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
- [Prioritized Experience Replay](<https://arxiv.org/abs/1511.05952>) `per-2015` · by Tom Schaul; John Quan; Ioannis Antonoglou; David Silver

---

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