Thomas Piacentini
← Workshop

09 · Reinforcement Learning

Reinforcement Learning

Original text · English

Agents that learn by doing. The foundation of RLHF.

Start this phase on GitHub

Prerequisites: Phase 1 probability and distributions, plus Phase 2 Lesson 01 for the ML taxonomy.

First lesson: MDPs, States, Actions and Rewards

Run this command from the repository root:

bash
python3 phases/09-reinforcement-learning/01-mdps-states-actions-rewards/code/main.py

Keep the command, exit code, random and greedy returns, value grids, and one sentence connecting policy quality to expected return.

Next action: Change the discount factor, predict the value shift, then continue to Dynamic Programming.

Browse the full Phase 9 lesson list or the cross-phase roadmap.

Continue step by step.

Code and artifacts 1
What you take away

Saved in your notebook on this device.

Sources and limits

Reading checkpoints are self-reported. Test results are recorded separately and apply to the executed cases.

AI Engineering from Scratch · 3f9715c · MIT

Download this file ↓