HomeCourses › Reinforcement Learning

Reinforcement Learning

From bandits to RLHF. Build agents that learn by doing

3 phases. 12 lessons. 12 labs. 1 capstone. Reinforcement learning from foundations to modern RLHF — RL fundamentals (MDPs, bandits, value functions, policy gradients), model-free RL (Q-learning, DQN, policy gradient methods, Actor-Critic, PPO), model-based RL & advanced methods (world models, MuZero, AlphaGo-style search, offline RL), and RLHF for LLMs (reward modeling, PPO for alignment, DPO, Constitutional AI). You build an RL agent that learns to play a game and an RLHF pipeline that aligns an LLM.

3 phases · 12 lessons · 12 labs · 1 capstone

Take Deep Learning from Scratch first — this course builds on it.

Outcomes you will have by the end

What you will be able to do

Markov Decision Processes (MDPs) · Multi-Armed Bandits & Exploration · Q-Learning & Deep Q-Networks (DQN) · Policy Gradients (REINFORCE) · Actor-Critic & Advantage Estimation · PPO (Proximal Policy Optimization) · Model-Based RL & World Models · Offline RL · RLHF — Reward Modeling & PPO for LLMs · DPO & Constitutional AI

Every phase, every lesson, every project

The technologies you will use

PyTorch · Gymnasium · Stable Baselines3 · Weights & Biases · Hugging Face TRL

Roles this course prepares you for

What reinforcement learning actually is

It's building agents that learn by interacting with an environment — taking actions, receiving rewards, and improving their policy over time. From bandits to DQN to PPO to RLHF, you implement the full spectrum of RL and understand how it's used to train game-playing AI and align LLMs.

What you do every day

You build RL systems — training agents in simulated environments, designing reward functions, and aligning LLMs with human preferences. When training is unstable or the agent learns the wrong behavior, you diagnose whether it's the reward design, the algorithm, or the environment.

Why companies hire for this

RL powers game-playing AI, robotics, recommendation systems, and most importantly, LLM alignment. Every company training LLMs needs engineers who understand RLHF. The engineer who implemented PPO from scratch is the one who can debug alignment training and implement novel techniques.

What this course is not

It is not a tutorial on using Stable Baselines3. It is not about game AI specifically. It is about understanding RL from first principles — the math, the algorithms, the training dynamics — and applying it to both game-playing and LLM alignment. If you want to understand how agents learn, this is the course.

Common questions

Do I need Deep Learning from Scratch first?

Yes — this course uses PyTorch, neural networks, and training loops throughout. Deep Learning from Scratch builds those foundations; this course applies them to the RL setting.

Is RL really used in LLM training?

Yes — RLHF (Reinforcement Learning from Human Feedback) is the technique that aligned ChatGPT, GPT-4, and Claude. PPO is the algorithm used. This course teaches RL from first principles and then applies it to LLM alignment, so you understand the full pipeline.

How is this different from the RL phase in ML & AI Engineering?

ML & AI Engineering covers RL in 4 lessons — enough to understand the concepts. This course spends 15 lessons implementing Q-learning, DQN, policy gradients, PPO, and RLHF from scratch. It's the difference between knowing about RL and being able to implement it.

What do I end up with?

A trained RL agent that learns to play a game from scratch, plus a complete RLHF pipeline that aligns an LLM with human preferences. And the ability to implement any RL algorithm from a research paper.

Key terms in this course

RLHF · Constitutional AI · DPO (Direct Preference Optimization) · Agent

Continue your learning path

Deep Learning from Scratch · Transformers & LLMs from Scratch · ML & AI Engineering · Multimodal AI Systems

Start the Reinforcement Learning course

Create a free account — the opening phases of 24 of 30 courses are free, no credit card. Or see Pro pricing.

All courses · Pricing · About · FAQ · Glossary