A trajectory of three steps has rewards and critic values . The episode ends after step 3, so the next value is . With and , what are the TD errors and the generalised advantage estimates ?
Reinforcement learning, Actor–critic
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can compute TD errors and combine them backwards with the GAE recursion .
Key idea
GAE defines , with TD error . It is computed backwards with .
Steps
- TD errors: .
- .
- , using value after the end.
- Here . Start at the end: .
- .
- .
- Use as the advantage weighting in the policy gradient. For step 2 the action beat the critic's expectation (), so it is made more likely. For steps 0 and 1 the critic was too optimistic, and those actions are made less likely.
Common mistakes
- Forgetting to set the value after the last step to . Treating a terminal state as non-zero gives wrong .
- Using alone, not , in the recursion.
- Computing forwards by summing all later terms with the same weight. The weights must decay as .
How long your answer should be
6 lines of arithmetic.
Last checked on 4 December 2026.
Read this
Previous in Reinforcement learning: A two-armed bandit policy is with . The agent samples arm 1 and receives reward . Using the REINFORCE update with , what is the update (a) with baseline and (b) with ? What is the gradient of , and how do you show that the score function has zero mean?
Next in Reinforcement learning: Two Bernoulli arms start with uniform priors. Arm A has been pulled times with successes and failure. Arm B has been pulled once with success. Give each arm's posterior, mean and variance. What is the probability that Thompson sampling picks B next? Why is this different from a greedy choice?