Check your starting point
An episode stops because its time budget expires. Must its bootstrap value be zero?
Compare your reasoning
Not necessarily. Distinguish truncation from genuine terminal states and state whether the task is finite-horizon or continuing. A timeout alone does not imply that future value is zero.
If this is unfamiliar, work through Write a functional environment before attempting the project.
Build in stages
1. Test environment and rollout semantics
Check transitions independently, preserve terminal rewards and label time/environment axes. Store the behavior policy that collected each action.
2. Compare updates and evaluations fairly
Audit the clipped objective for both advantage signs. Freeze the evaluation protocol, compare a simple baseline and distinguish training seeds from repeated episodes.
3. Learn and audit a value baseline
Fit a value table from retained trajectories, compare its actual masked error with independent calculations, and derive a multi-step GAE trace. Keep the final pre-reset observation and separate bootstrap and trace masks.
Try a changed condition
Make a prediction before opening the reasoning. Keep your answer and the evidence you would collect.
With discount 0.9, reward 1 and next-state value 10, compare a true terminal target with a time-limit cutoff in a continuing task.
Compare an approach
The true terminal target is 1. A cutoff that only ends data collection can retain bootstrap value, giving . Use the final pre-reset observation, not a new episode’s reset observation. Declare the task semantics: a genuinely finite-horizon terminal objective can require a different contract. Lesson rl-05 checks both bootstrap modes and reset boundaries with retained observations. The actor remains a finite-horizon reward-to-go implementation.
Diagnose a likely failure
Symptom: PPO ratios always equal one after every update.
Check next: Check that old log probabilities were stored at collection rather than recomputed from the current policy.
Decide what is ready
Use policy-evaluation. Keep independent transition checks, behavior-policy identity, changed-horizon cases and paired evaluations across declared independent training seeds. Retain the fitted value table, independently recomputed error and terminal/cutoff GAE checks from stage 5.
Where to put your project code
Write your code in: projects/policy-evaluation/my_model.py (copy projects/policy-evaluation/starter/model.py first: cp projects/policy-evaluation/starter/model.py projects/policy-evaluation/my_model.py).
Verify your implementation: python3 projects/policy-evaluation/tests/check.py --stage all --impl projects/policy-evaluation/my_model.py
Run the staged project checks on your implementation in projects/policy-evaluation/my_model.py and record your transfer experiment results in your portfolio.
What still needs further work
The actor still uses sampled reward-to-go. Connecting a learned critic and GAE to actor updates, continuous actions and larger benchmark environments requires further implementation and held-out evaluation. The separate tabular critic and GAE lesson establishes their bounded mechanics.