Reinforcement Learning Foundations
Frame decisions as reinforcement learning problems, train value-based and policy-gradient agents, and explain how RL is used to post-train language models.
4 objectives 6 steps about 135 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Frame a sequential decision problem as a Markov decision process (states, actions, rewards, discounted return, policy, value function) and balance exploration against exploitation in a multi-armed bandit with epsilon-greedy and UCB or Thompson sampling.
- Implement tabular Q-learning on a small Gymnasium environment, extend it to a deep Q-network with experience replay and a target network, and report mean episode return across several seeds.
- Implement a policy-gradient agent (REINFORCE with a baseline) and explain how actor-critic methods and PPO's clipped objective reduce variance and stabilize updates.
- Explain how reinforcement learning post-trains language models (a learned reward model with PPO in RLHF, group-relative methods such as GRPO with verifiable rewards), how this differs from DPO-style preference tuning, and how reward hacking shows up.
Lesson plan
6 steps, about 135 min · 5 of 5 lessons available so far
- Agents, Rewards and Returns: Framing Decisions as an MDP Concept · 20 min
- Worked Example: Explore or Exploit? Bandit Strategies Compared Worked example · 20 min
- Lab: From a Q-Table to a Deep Q-Network Lab · 30 min
- Lab: Policy Gradients from REINFORCE to Actor-Critic Lab · 30 min
- Rewards for Language Models: RLHF, GRPO and Their Failure Modes Concept · 20 min
- Check: Pick and Debug an RL Approach Knowledge check · 8 questions
Practise it
In Gymnasium, solve CartPole with a DQN and with an actor-critic or PPO agent over five seeds each, plot the mean and spread of episode return against environment steps, and write a half-page comparison of sample efficiency and stability; then, for a given LLM post-training scenario, argue whether DPO, RLHF or GRPO fits and what reward hacking to watch for.
References
Hard prerequisites
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.