What Reinforcement Learning Is — Learning from Consequences

Supervised learning needs a teacher who knows every right answer; reinforcement learning needs only a goal and the freedom to try. It's how a system learns to play a game, control a robot, or — increasingly — align a language model, not by being shown correct outputs but by acting, seeing what happens, and learning from the consequences. This series builds RL from first principles, and it starts with why "learning from reward" is a fundamentally different and more general kind of learning.

This series is the dedicated treatment of the third ML paradigm from the Machine Learning from First Principles series. RL is the backbone of game-playing AI, robotics, and — the reason it matters to everyone now — RLHF, the technique that turns a raw language model into a helpful assistant. Post 1 sets up the whole framework: the agent, the environment, the reward, and the hard problems that make RL its own discipline.

Learning by interaction, not by examples

In supervised learning (the ML series), every training example comes with the correct answer, and the model learns to reproduce it. That’s unavailable for a huge class of problems: nobody can give the “correct” move for every chess position, or the correct motor command for every instant of a robot’s walk. What you can specify is a goal — win the game, stay upright, maximize the score — and let the system figure out how to achieve it.

Reinforcement learning is learning to act by interacting with an environment to maximize cumulative reward. There’s no answer key; there’s only feedback — a reward signal that says how well things are going — and the learner must discover, through trial and error, which actions lead to good outcomes. This is closer to how animals and humans actually learn: a child learns to walk not by being shown the correct joint angles but by trying, falling, and adjusting. RL formalizes learning from consequences rather than from instruction.

The practical upshot: RL applies where you can define what success looks like (the reward) but not how to achieve it (the policy). That’s an enormous and important class — games, control, resource allocation, and the alignment of AI systems — and it’s exactly where supervised learning can’t reach.

The core loop: agent, environment, reward

RL’s framework is a loop between two entities, and nearly all its vocabulary comes from naming the parts:

The subtle, defining feature is that reward is often delayed. The action that wins a chess game might have been made thirty moves earlier; the reward (winning) arrives long after the decisive move. So the agent can’t just maximize immediate reward — it must learn which actions lead to good outcomes eventually, assigning credit backward through time. This credit assignment problem — figuring out which of many past actions deserves the reward — is the heart of what makes RL hard and interesting, and the next posts (value functions, Bellman equations) are largely about solving it.

The two hard problems that define RL

Two challenges, absent from supervised learning, give RL its distinctive character and drive almost all of its algorithms:

These two problems are why RL is a separate discipline rather than a flavor of supervised learning. The agent is learning from a sparse, delayed, self-generated signal while simultaneously deciding how much to gamble on the unknown — a genuinely harder learning problem, and the reason RL is both powerful and notoriously finicky.

The throughline: reinforcement learning is learning to act by interacting with an environment to maximize cumulative reward — no answer key, only a goal and trial-and-error feedback — so it reaches the vast class of problems where you can define success (the reward) but not how to achieve it (games, control, AI alignment). Its framework is the loop of agent, environment, state → action → reward, producing a policy (state→action strategy, the thing RL learns). What makes it hard and distinct: reward is often delayed, creating the credit assignment problem, and the agent must constantly balance exploration vs exploitation (the multi-armed bandit dilemma) — two challenges with no analog in supervised learning, and the source of everything that follows.

Key takeaways

Further reading

Sources & References