Unit 8 of 12 · about 3 hours · explain, measure

Evaluation policies and seeds, episodes and environments as uncertainty units

Training noise makes every policy look better on its own rollout data. Honest evaluation needs a clean policy, a clean env and enough runs to see the spread.

You'll be able to

  • Separate the noisy training policy from the evaluation policy with its own env and seed stream.
  • Name seeds, episodes and environments as distinct uncertainty units and say what each one varies.
  • Explain why point estimates from a few runs mislead and what replaces them.

Covers

Training versus deterministic or stochastic evaluation policySeed, episode and environment as uncertainty units
1

Read

In this order, only the parts listed

0 of 2 done

  1. SB3 tips: how to evaluate an RL algorithmStable-Baselines3 RL Tips and Tricks

    How to evaluate an RL algorithm: separate test env with EvalCallback over 5 to 20 episodes, deterministic=True predict for stochastic policies, several seeds for quantitative results, and the wrapper warning with the Monitor note (page read 2026-10-14)

  2. Precipice paper: why point estimates failDeep Reinforcement Learning at the Edge of the Statistical Precipice

    arXiv:2108.13264v4 Sections 1 to 3: unreliable point estimates, the Atari 100k case study with median uncertainty even at 50 runs, and the call for interval estimates over point scores

2

Focus on

  • Evaluate on a separate test env, never on training rollouts: training actions carry exploration noise, so training return understates or misstates the policy.
  • Deterministic eval usually scores higher for stochastic policies but it is a different policy; report which mode produced each number.
  • Seeds vary initialization and sampling, episodes vary trajectory noise under one policy, and environments vary the task itself: resampling the wrong unit answers the wrong question.
  • Training curves proxy progress but underestimate the agent; periodic clean evaluation with between 5 and 20 episodes is the estimate to trust.
Common mistakes · 3
  • Evaluating without a Monitor wrapper and quoting the numbers. SB3 warns unwrapped eval envs misreport lengths and rewards; the warning is the lesson.
  • Mixing stochastic and deterministic eval numbers across methods. Pick one mode per comparison or report both with labels.
  • Treating episodes as seeds. More episodes shrink trajectory noise for one policy; only more seeds show sensitivity to initialization and sampling luck.
3

Try it yourself

Closed-book, before checking anything

Closed-book, write the evaluation protocol: separate test env, EvalCallback cadence, deterministic flag stated, several seeds, wrapper-matched. Explain in two sentences why a median over 3 runs can still mislead, using the precipice case study.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Why must evaluation use a separate test env instead of training rollouts?Answer

    Training rollouts use exploration noise and evolving behavior, so their returns do not estimate any fixed policy. A separate env with a fixed eval policy measures what the agent actually learned.

  2. 2.Deterministic eval scores higher than stochastic eval on the same weights. Which number do you report?Answer

    The one matching your claim, labeled. Deterministic mode is a different policy; report the mode with the number and keep it fixed across methods.

  3. 3.Three seeds give means 100, 200 and 900. What is wrong with reporting the mean?Answer

    One lucky run dominates and the spread is hidden. Report per-run records with a robust aggregate and interval, and keep the outlier in the data.

  4. 4.What changes when you add episodes versus adding seeds?Answer

    Episodes reduce trajectory noise for fixed policies; seeds reveal sensitivity to initialization and sampling. They are different uncertainty units.

You're done when

Your eval harness runs a labeled deterministic protocol on a separate env across seeds, and you can explain what each uncertainty unit varies.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 12 more in the section
  • Deep Reinforcement Learning at the Edge of the Statistical PrecipiceDeepMind and Google Research · required

    Study the failure of common point estimates and small-seed comparisons. Report interval estimates, aggregate-score sensitivity and performance profiles with the underlying per-run data retained.

  • Stable-Baselines3 RL Tips and TricksStable-Baselines3 · reference

    Use How to evaluate an RL algorithm for separate test envs, EvalCallback and deterministic eval; Which algorithm should I use for the discrete/continuous/goal picker and HER pointer; the custom-environment section for Markov, normalization and TimeLimit handling; and the seed-variance and RL-zoo tuning advice. Treat SOTA and speedup claims as pointers, not targets.

Also in this section

  • Berkeley CS 185/285 Deep Reinforcement Learning (Spring 2026) - Exploration and Off-Policy Actor-CriticUC Berkeley · primary

    Slides are public at https://rail.eecs.berkeley.edu/deeprlcourse/static/slides/lec-N.pdf; current videos are not, and the public Fall 2023 playlist numbers lectures differently. Study Lecture 19 (exploration) and Lecture 23 (advanced exploration), and the SAC part of Homework 3 (src/agents/sac_agent.py on InvertedPendulum and Hopper; HalfCheetah needs hours on a GPU). The homework pins gym==0.25.2, which fails on NumPy 2, so port it to Gymnasium (terminated and truncated) or pin numpy<2 in its own environment, and turn off its forced WandB logging.

  • Stanford CS234 Winter 2026 - Bandits and ExplorationStanford University · required

    Study Lectures 9 to 12 (bandits, optimism and upper confidence bounds, exploration in MDPs). Rebuild one exploration comparison with matched information, interaction, update and tuning budgets.

  • Stanford CS224R Spring 2026 - Off-Policy and Goal-Conditioned RLStanford University · required

    Study Lecture 05 (off-policy actor-critic) and Lecture 12 (multi-task and goal-conditioned RL) and their DDPG and HER readings. Implement one goal relabeling test on a small task.

  • Soft Actor-Critic Algorithms and ApplicationsBerkeley AI Research · required

    Read the maximum-entropy objective, the soft policy iteration and the actor and critic targets, then the automatic temperature adjustment (this version adds it; the first SAC paper used a fixed temperature). Implement or audit a compact SAC path and compare sample efficiency and wall time with PPO under a matched protocol.

  • Addressing Function Approximation Error in Actor-Critic Methods (TD3)Fujimoto, van Hoof and Meger (ICML 2018) · required

    Read the overestimation analysis for actor-critic methods, clipped double Q-learning, delayed policy updates and target policy smoothing. Ablate one of the three changes on a small continuous task with matched seeds.

  • Hindsight Experience ReplayAndrychowicz et al. (NeurIPS 2017) · required

    Read the goal-conditioned setup and the relabeling strategies (final, future, episode). Implement relabeling on a sparse-reward bit-flipping or goal task and test that relabeled transitions carry the substituted goal and its recomputed reward.

  • Exploration by Random Network DistillationBurda et al. (ICLR 2019) · support

    Read the prediction-error bonus, the separate intrinsic and extrinsic value heads and the non-episodic intrinsic return. Use it to explain why a novelty bonus depends on the representation and how it can reward noise.

  • Unifying Count-Based Exploration and Intrinsic MotivationBellemare et al. (NeurIPS 2016) · support

    Read the pseudocount derivation from a density model and the exploration bonus built on it. Compare a tabular count bonus with its pseudocount form on a small grid.

  • What Matters in On-Policy Reinforcement Learning? A Large-Scale Empirical StudyAndrychowicz et al. (2020) · support

    Read the experimental protocol and the recommendations on normalization, initialization and hyperparameter sensitivity. Use it to set a tuning budget that is the same for every method you compare.

  • rliableGoogle Research · support

    Use the official repository to compute interquartile means, stratified bootstrap intervals and performance profiles for the track experiments. Verify the input run and task axes and keep plots reproducible from raw run records; check the pandas version it needs in your environment.

  • Hands-on Modern RL - DDPG, TD3, SAC and Intrinsic MotivationWalking Labs · support

    Use the DDPG and TD3 and SAC pages for vocabulary and the intrinsic-motivation page for concepts only. Its displayed TD3 target omits the terminal mask (the code has it), its SAC chart is author-reported, and its multi-agent demo does not learn; do not use those as practice. Pin commit 9231bab of walkinglabs/hands-on-modern-rl; its code/chapterNN folders do not follow the site chapter numbers.

  • Gymnasium documentation: API, time limits, vector envs and wrappersFarama Foundation · reference

    Use the Env API page for the reset and step contract, the handling-time-limits tutorial for termination versus truncation bootstrapping, the vector env pages for SyncVectorEnv and AsyncVectorEnv autoreset modes, and the wrappers table for RecordEpisodeStatistics, ClipAction, NormalizeObservation and TimeLimit.