5.2.2 · D3Deep & Advanced RL

Worked examples — Experience replay

2,349 words11 min readBack to topic

Everything below reuses only symbols the parent already earned. Let us restate the three we lean on hardest, in plain words, before any arithmetic:


The scenario matrix

Every cell below is a distinct thing the reader could face. Each example is tagged with the cell(s) it fills.

# Cell class Distinguishing input Filled by
A Normal non-terminal transition, , under-estimate Ex 1
B Terminal transition, , over-estimate Ex 2
C Full mini-batch loss + gradient sign mixed batch Ex 3
D PER probabilities, general Ex 4
E Degenerate knob uniform limit Ex 5
F Degenerate knob greedy limit Ex 5
G Importance-sampling weights + normalisation Ex 6
H Limiting behaviour of buffer size on correlation small vs large Ex 7
I Real-world word problem end-to-end Ex 8
J Exam twist: off-policy validity on-policy trap Ex 9

We reference these figures as we go:

Figure — Experience replay

Worked examples


Recall Self-test across the matrix

Terminal flag makes the target equal to what? ::: Just the reward (the future term is zeroed by ). At , every PER sampling probability equals? ::: — plain uniform replay. The IS weight for the most-sampled transition is the largest or smallest? ::: Smallest (we down-weight over-sampled data). Why divide IS weights by ? ::: To keep all weights so the correction only shrinks gradients (stability). Doubling buffer size does what to correlation between two random samples? ::: Roughly halves it — more i.i.d.-like.