executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
ppo_trajectory_advantage_estimationCompute bootstrapped returns and generalized advantage estimates for fixed-horizon PPO rollout batches.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when a PPO recovery or implementation has a fixed-horizon rollout segment and needs advantages and returns before optimizing the surrogate objective.
Do not use it to update policy parameters or evaluate the clipped surrogate directly.
rewards: non-empty numeric reward sequence.value_predictions: value estimate for each reward timestep.terminal_flags: booleans or 0/1 markers where true means the transition ended an episode.next_value_prediction: bootstrap value after the segment.gamma: discount factor.gae_lambda: trace parameter.JSON containing advantages, returns, normalized_advantages, and summary statistics.
delta = reward + gamma * next_value * nonterminal - value.gae = delta + gamma * lambda * nonterminal * next_gae.returns = advantages + values and safely normalized advantages.Run:
python tests/test_advantage_estimation.py
python scripts/estimate_advantages.py --rewards '[1,1]' --values '[0.5,0.25]' --terminals '[false,true]' --next-value 0 --gamma 0.99 --gae-lambda 0.95
The skill assumes rewards and values have already been sampled by a policy. It does not construct environments or perform policy optimization.