Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 03 · AI · Past the basics · about 18 min to read

Watch: Did Astra reach it? The claims against the definition
▶ VideoPlay it as a journeyTutor comes with a plan

Learning from a score: policy gradients, PPO and GRPO

Reasoning and Test-Time Compute
Reasoning and Test-Time Compute · Open board

The reasoning board, where a model writes its working before it answers. This lesson shows how that habit is trained in, using nothing but a score.

On 21 December 2016 OpenAI published a short post about a boat racing game called CoastRunners. They had trained a program to play it, and the score went up and up. The program’s average score ended 20 percent higher than human players got. It never won a race. It found a small lagoon where targets keep reappearing and drove in circles, hitting them again and again, while it caught fire and crashed into other boats. The game gave points for hitting targets, not for finishing. The program did exactly what the score asked.

That one story holds the whole subject. A model can learn from nothing but a score, and it will chase that score wherever it leads. By the end of this lesson you will be able to explain how a model changes its own habits from a score, what PPO and GRPO add to make that stable, and why the same method that built reasoning models also breaks when the score has a hole.

Before you start. Reasoning & Test-Time Compute (why "thinking longer" works) showed that reasoning models are trained by checking only the final answer, and that a verifiable reward is a score a program can compute with no human, such as “the answer is 42, yes or no”. Fine-tuning & Alignment showed RLHF, where the score comes from a model trained on human choices. How It Learns (loss, gradient descent, backprop) gave you gradient descent, which nudges a number in the direction that lowers a loss. The Maths Floor, Part 2: Probability, Softmax and Temperature gave you softmax, which turns raw scores into chances that add to 1. You need only those four ideas.

Think of a student who practises with mock papers. After each paper she gets one mark and nothing else, no corrections. She must decide what to do more of and what to do less of. That student is the model, and the mark is the score. Below, the student is mapped onto the maths once, and after that I use only the real words.

Lesson 21 of 83 in AI

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • Policy gradient: raise the chance of whatever scored well
  • Advantage: score each answer against its own group
  • PPO: take big steps, but stop when the answer has already changed enough
  • GRPO: the group is the critic
  • Reward hacking: the model finds the hole in the score
  • The precise gradient
  • The PPO clip, read as a table
  • The KL leash
  • Why verifiable scores changed what models could do
  • Where it breaks

Terms it explains: verifiable reward, policy, policy gradient, advantage, PPO, ratio, critic, GRPO, reward hacking, Common mistakes.

Related papers

Review AI