Chapter 4 · Part 2

Reinforcement: trial and reward

The third paradigm feels the most like how animals — and people — actually learn. There's no dataset of answers. Instead an agent acts in an environment, and every so often gets a reward or a penalty. Over many tries, it learns a strategy that racks up as much reward as possible. This is reinforcement learning (RL).

Scroll to watch an agent learn its way to the prize.

A grid world: the agent (🤖) wants the reward (🏆) and must avoid the penalty (💥).

scroll

Agent, action, reward

The RL vocabulary is just those everyday pieces with names:

  • Agent — the learner (the robot, the game player).
  • Environment — the world it acts in (the grid, the game, the road).
  • Action — a move it can make.
  • Reward — a number the environment hands back: +1 at the goal, −1 in the pit.
  • Policy — the strategy it's learning: in this situation, take that action.

The goal isn't to match a label; it's to maximize total reward over time.

What it's uniquely good for

RL shines when there's no dataset of right answers, but you can score outcomes — and when decisions play out over time. It's how AlphaGo beat the world champion, how agents master video games from the raw score, and how robots learn to walk. Its weakness is the flip side: it can need millions of trials, and a poorly chosen reward gets gamed in surprising ways.

We've now met all three paradigms cleanly separated. In the real world, though, they rarely stay in their lanes — the most important models today deliberately combine them. Next: the blurry lines.