计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
qdagger_loss【效率与协作】Compute the QDagger objective for policy-to-value reincarnating RL using n-step TD loss plus teacher-policy distillation.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when implementing or validating a reduced or full QDagger-style policy-to-value reincarnating RL experiment. It is appropriate when you have transition records, student Q-values, and teacher action probabilities. Do not use it as a standalone imitation-only objective; the TD and distillation terms must remain separately visible.
q_values: mapping from state ids to action-value lists.transitions: records with state, action, n_step_return, discount, next_max_q, and teacher_policy.temperature: positive softmax temperature for deriving the student policy from Q-values.lambda_t: current distillation coefficient.td_loss: mean squared Bellman error.distillation_loss: mean teacher cross-entropy against the student softmax policy.combined_loss: td_loss + lambda_t * distillation_loss.examples: per-transition targets, predictions, and loss terms.n_step_return + discount * next_max_q.softmax(q / temperature).Run:
python scripts/qdagger_loss.py --self-test
python tests/test_qdagger_loss.py
This implementation is deterministic and dependency-free. It is intended for recovery harnesses, tests, and small tabular/scalar checks, not high-throughput deep RL training.