Learning problem学习问题
Value learning combines bootstrapped targets, correlated experience, and a policy that changes while data is collected—conditions that can destabilize training.价值学习同时面临自举目标、相关经验,以及随数据收集持续变化的策略,训练容易失稳。
2024 · REINFORCEMENT LEARNING
Configurable Deep Q-Network Experiments可配置 Deep Q-Network 实验
A PyTorch implementation that turns the DQN training loop into comparable experiments across network variants and environments, with configuration, visualization, and saved checkpoints built in.一套 PyTorch 实现:把 DQN 训练循环扩展为可比较的网络结构与环境实验,并内置配置、可视化和 Checkpoint 保存。
Value learning combines bootstrapped targets, correlated experience, and a policy that changes while data is collected—conditions that can destabilize training.价值学习同时面临自举目标、相关经验,以及随数据收集持续变化的策略,训练容易失稳。
Replay memory decorrelates samples, an epsilon-greedy policy manages exploration, and a separate target network slows the moving objective.经验回放降低样本相关性,Epsilon-greedy 管理探索,独立目标网络减缓目标漂移。
One runner compares single-hidden, two-hidden, and Duelling DQN models across CartPole and LunarLander configurations.同一 Runner 可比较单隐藏层、双隐藏层与 Duelling DQN,并覆盖 CartPole 与 LunarLander 配置。
Training loop训练循环
The implementation makes each stability mechanism explicit, so architecture and hyperparameter changes can be compared without rewriting the training loop.实现把每一种稳定机制显式化,使网络结构与超参数可以直接比较,而无需重写训练循环。
Use epsilon-greedy action selection with a configurable decay schedule for each environment.针对每个环境使用带可配置衰减计划的 Epsilon-greedy 动作选择。
Store transitions in a bounded replay buffer and sample minibatches after the warm-up threshold.把 Transition 存入有界 Replay Buffer,并在预热阈值后抽取 Minibatch。
Compute bootstrapped Bellman targets, backpropagate loss, and optionally clip gradients.计算自举 Bellman Target、反向传播损失,并可选择进行梯度裁剪。
Compare periodic hard copies with soft Polyak updates controlled by tau.比较周期性硬同步与由 Tau 控制的 Polyak 软更新。
Experiment design实验设计
Environment-specific YAML controls discounting, replay capacity, exploration decay, hidden sizes, learning rate, synchronization, stopping reward, and frame budget. The command line selects the environment and network variant, so comparable runs share one implementation path.环境级 YAML 统一控制折扣因子、Replay 容量、探索衰减、隐藏层、学习率、同步方式、停止奖励与 Frame 预算;命令行只选择环境和网络变体,让可比较实验复用同一实现路径。
Architecture comparison架构比较
The experiment surface separates a deeper plain DQN from Duelling DQN, which estimates state value and action advantage through different streams before combining them. Saved models and reward traces make those comparisons reproducible.实验将更深的普通 DQN 与 Duelling DQN 分开比较;后者分别估计状态价值与动作优势,再合并输出。已保存模型与奖励轨迹让比较结果可以复现。