Hands-on Modern RL
by WalkingLabs
A free open-source book that takes you from CartPole PPO to GRPO, RLVR and agentic RL with runnable code.
Overview
Hands-on Modern RL is an open-source curriculum from WalkingLabs, the group behind Learn Harness Engineering and Modern LLM Notebook. It was first released on 2 May 2026, got a full English translation and PDF on 15 May 2026, added online classic-RL environments on 19 August 2026, and was still receiving commits in late November 2026. The GitHub repo has about 5,000 stars, 370 forks and 794 commits, and the content is licensed CC BY-NC-SA 4.0. The book has a prologue, seven parts and 26 chapters. Part I covers sequential decisions, value functions and Bellman equations. Part II covers DQN, policy gradients, actor-critic, TRPO/PPO and continuous control. Part III covers offline RL, imitation and inverse RL, exploration and multi-agent RL. Part IV is LLM alignment and post-training: the RLHF pipeline, the DPO family, GRPO and RLVR with verifier engineering, reasoning models and inference-time compute, process rewards and search, and industrial-scale RL. Part V covers tool use and multi-turn agentic RL, RL for coding agents, deep research and browser agents, and GUI agents. Parts VI and VII cover multimodal RL, reward hacking, evaluation and self-play. Labs use PyTorch, Gymnasium, Stable-Baselines3, veRL, EasyR1 and rLLM, and four appendices cover debugging, core algorithm implementations, GPU-hour estimates and the math. The book site defaults to Simplified Chinese and has an English version; the README is in English.
At a Glance
- Topic
- Fine-Tuning
- Level
- Intermediate
- Format
- Book
- Cost
- Free
- Duration
- Self-paced; 26 chapters plus 4 appendices with runnable labs (no official time estimate; some labs need a GPU notebook)
- Provider
- WalkingLabs
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Train PPO on CartPole and visualise how the policy improves during training
- ✓Derive Bellman equations and implement value iteration and Q-learning from scratch
- ✓Implement DQN, REINFORCE, actor-critic and PPO with GAE advantage estimation
- ✓Run an RLHF pipeline by training GSM8K with PPO using the veRL framework
- ✓Build RLVR reward functions and train GRPO on financial tool calling
- ✓Apply DPO and its variants and measure the results of alignment experiments
- ✓Train multi-turn coding and financial analysis agents with rLLM, including credit assignment
- ✓Diagnose reward hacking and design evaluation protocols that make RL results reproducible
Highlights
- •Covers the full path from tabular RL to GRPO, RLVR and agentic RL in a single book instead of separate courses
- •Chapter-aligned Python scripts with per-chapter requirements files, 14 chapter notebooks and 12 online experiment studios
- •About 5,000 GitHub stars and 794 commits, with commits still landing in November 2026
- •Uses the post-training frameworks practitioners actually run (veRL, EasyR1, rLLM) rather than toy re-implementations only
- •Includes a GPU-hour estimate table and a training-metrics glossary in the appendices, useful before you rent compute
Who It’s For
Best For
- ✓ML engineers moving from SFT into RL-based post-training with GRPO or RLVR
- ✓Engineers building tool-using or coding agents who want to train the policy, not only prompt it
- ✓Self-learners who want classic deep RL foundations tied directly to LLM alignment
Prerequisites
- •Comfortable with Python and basic PyTorch
- •Introductory linear algebra, probability and calculus (the appendices review the math)
- •GPU notebook access for the LLM and heavier simulation labs; early chapters run on CPU
FAQ
What is Hands-on Modern RL?
Hands-on Modern RL is a free, open-source reinforcement learning book for engineers who know Python and basic PyTorch and want to understand LLM post-training. It runs from classic RL through RLHF, DPO, GRPO and RLVR to training tool-using, coding and browser agents, with chapter-aligned Python scripts and notebooks you can run yourself.
Is Hands-on Modern RL free?
Hands-on Modern RL is free to access.
What level is Hands-on Modern RL for?
Hands-on Modern RL is aimed at a intermediate audience. Recommended background: Comfortable with Python and basic PyTorch, Introductory linear algebra, probability and calculus (the appendices review the math), GPU notebook access for the LLM and heavier simulation labs; early chapters run on CPU.
How long does Hands-on Modern RL take?
Expect roughly Self-paced; 26 chapters plus 4 appendices with runnable labs (no official time estimate; some labs need a GPU notebook). Most learners work through it at their own pace.
What will I learn from Hands-on Modern RL?
You'll learn: Train PPO on CartPole and visualise how the policy improves during training; Derive Bellman equations and implement value iteration and Q-learning from scratch; Implement DQN, REINFORCE, actor-critic and PPO with GAE advantage estimation; Run an RLHF pipeline by training GSM8K with PPO using the veRL framework; Build RLVR reward functions and train GRPO on financial tool calling; Apply DPO and its variants and measure the results of alignment experiments; Train multi-turn coding and financial analysis agents with rLLM, including credit assignment; Diagnose reward hacking and design evaluation protocols that make RL results reproducible.
Topics
Sources
This page was written from 4 sources, 3 on domains other than walkinglabs.github.io.