You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/appendix_gpu_hours/gpu-hours-estimation.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,7 +186,7 @@ Suitable for learning the full process of RLHF/RLVR/DPO, and can complete a full
186
186
187
187
- Reproduce the training curves of R1-Zero on GSM8K using GRPO ([Chapter 18](../chapter18_grpo/grpo-practice-and-mechanism))
188
188
- Fine-tune on Anthropic HH-RLHF data using DPO ([Chapter 14](../chapter17_dpo/dpo-objective-derivation))
189
-
- Run SAC/TD3 on CartPole / MuJoCo ([Chapter 9](../chapter11_continuous_control/deterministic-policy-gradient-ddpg))
189
+
- Run SAC/TD3 on CartPole / MuJoCo ([Chapter 9](../chapter11_continuous_control/ddpg))
190
190
:::
191
191
192
192
### Multi-GPU Experiments (7B–13B Models)
@@ -301,4 +301,4 @@ Next Steps Recommendation:
301
301
302
302
-**Do a Baseline Experiment**: Refer to the GRPO/DPO code in [Appendix D Code Quick Reference](../appendix_code_cheatsheet/sft-kl) and run it on a single GPU.
303
303
-**Plan a Mid-Scale Experiment**: Refer to the distributed training and monitoring sections in [Appendix B Engineering Practices](../appendix_industrial_training/training-debugging).
304
-
-**Read the Cost Disclosure in Frontier Papers**: Look for training details in the tech reports in [Appendix F](../appendix_paper_reading/paper-reading-guide).
304
+
-**Read the Cost Disclosure in Frontier Papers**: Look for training details in the tech reports in [Appendix C](../appendix_paper_reading/learning-resources).
Copy file name to clipboardExpand all lines: docs/en/chapter03_mdp/value-q.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -362,17 +362,29 @@ The shortest path from S to G hugs the cliff edge and takes 11 steps. But it is
362
362
<em>Source: <a href="https://gymnasium.farama.org/environments/toy_text/cliff_walking/"target="_blank"rel="noopener noreferrer">Gymnasium Documentation - Cliff Walking</a>. The original environment is adapted from Sutton and Barto, <em>Reinforcement Learning: An Introduction</em>, Example 6.6.</em>
363
363
</p>
364
364
365
-
**Q-Learning** (off-policy) uses $\max_{a'} Q(s',a')$ in its target, which assumes that the future always takes the optimal action. Therefore it learns the shortest cliff-hugging path.
365
+
The two algorithms behave differentlyinCliffWalking because one term in their update targets is different.
366
366
367
-
**SARSA** (on-policy) uses the target $r + \gamma Q(s', a')$, where $a'$ is the action actually sampled from the current behavior policy (typically $\varepsilon$-greedy). Since SARSA accounts for the risk of exploration-induced mistakes inside its update, it tends to learn a safer path away from the cliff, even if it is longer.
Its target is$r+\gamma\max_{a'}Q(s',a')$. Regardless of which next action the behavior policy actually executes, Q-Learning uses the largest Q-value in $s'$. It therefore assumes that the next step will execute the optimal action perfectly. The resulting policy follows the shortest path beside the cliff without accounting for the risk that exploration may move the agent downward.
Its target is$r+\gamma Q(s',a')$, where $a'$ is the action actually sampled from the current $\varepsilon$-greedy policy. Because SARSA learns from the next action that the behavior policy really selected, its update includes the risk of exploration-induced mistakes. It therefore tends to learn a longer but safer path away from the cliff.
368
382
369
383
The difference between the two algorithms comes from different assumptions about “the future policy”:
370
384
371
385
- Q-Learning estimates the value of the **optimal policy**, independent of how the current behavior policy explores.
372
386
-SARSA estimates the value of the **current behavior policy**, so it avoids risks introduced by exploration.
373
387
374
-
This isnot a question of which one is “better”. They answer different questions. Q-Learning answers “if we ignore the randomness of exploration, what is the ideal optimum?” SARSA answers “given the exploration noise we are actually using, what is the safest way to behave?”.
Copy file name to clipboardExpand all lines: docs/en/chapter07_dqn/visual-game-projects.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -339,7 +339,7 @@ Observations must also be sufficient for decision-making. The current frame or f
339
339
340
340
Rewards must arrive within a reasonable time. DQN propagates future returns step-by-step through the TD target. If the replay buffer contains only negative samples or meaningless transitions for a long time, the network cannot know which early action was useful. This is not a formula error — it is the learning signal being too far from the action.
341
341
342
-
Finally, ε-greedy exploration must be able to produce useful experience. When action combinations are too many, episodes too long, and failure feedback too late, random exploration may fail to collect meaningful samples for a long time. In such cases, reducing the action set, designing staged rewards, or switching to methods better suited for long-horizon exploration is needed.
342
+
Finally, $\epsilon$-greedy exploration must be able to produce useful experience. When action combinations are too many, episodes too long, and failure feedback too late, random exploration may fail to collect meaningful samples for a long time. In such cases, reducing the action set, designing staged rewards, or switching to methods better suited for long-horizon exploration is needed.
343
343
344
344
Not meeting these conditions does not mean DQN completely fails — it means additional design is needed: continuous actions require different algorithms, missing observations require memory, sparse rewards require engineering or task decomposition.
0 commit comments