Why does an agent learn from old experiences?
Original sample-order diagnostic using a uniform seeded permutation without replacement; not DQN training or an Atari reproduction.
This notebook runs the complete saved experiment, checks its assertions, and regenerates the SVG from the computed results. Python 3.10+ and standard-library modules only. Place experiment.py and figure_generation.py beside the notebook. The exact loaded assets are recorded in notebook metadata.
sequential same-regime pairs=10/11 replay same-regime pairs=4/11 Both orders contain the same 12 transitions. expected shuffled same-regime fraction=0.455 Exact balanced-buffer enumeration: 924 label orders; expected adjacent matches=5.0/11 Probability of matching the sequential extreme = 2/924 = 0.002165
Regenerated figure.svg from results.json.
Inspect the saved result
The article's static figure is available before running code. The regenerated figure.svg uses results.json, and every plotted quantity comes from the experiment.
Change an input in experiment.py, rerun both code cells, then compare the saved result and figure.
Python runs locally in this page. Saved results and figures are visible before execution.