What is reinforcement learning?
Reinforcement learning, often shortened to RL, is learning from consequences. Nobody shows the system the right answer. It tries something, sees how well that worked and gradually favours the choices that paid off. It is how software has learned to play board games and video games at a high level, and it is used in robotics, recommendation systems and the training of language models.
How does reinforcement learning work?
Every reinforcement learning setup has the same parts.
| Part | Meaning | Example: ad bidding |
|---|---|---|
| Agent | The learner that makes decisions | The bidding system |
| Environment | What it acts on | The ad auction |
| State | The situation it observes | Time of day, audience, budget left |
| Action | A choice it can make | Bid $1.20 on this impression |
| Reward | Feedback on the result | A conversion, minus the cost |
| Policy | Its learned strategy | Which bid to make in which state |
The agent acts, observes the reward and the new state, and updates its policy. Over many rounds it learns which actions lead to the most reward in total, not only at the next step.
Two tensions shape the process. The first is exploration against exploitation: trying new actions to learn about them, or repeating what already works. The second is delayed reward: an action may pay off many steps later, and the system has to work out which earlier choice deserves the credit.
Reinforcement learning vs supervised learning
Supervised learning studies examples with the correct answer attached. Reinforcement learning has no answer key, only a score after the fact. Supervised learning suits prediction, such as whether a lead will convert. Reinforcement learning suits sequences of decisions, where each choice changes what happens next.
How is reinforcement learning used with language models?
Language models are refined with a version of it. In reinforcement learning from human feedback, people rate or rank a model's answers, and the model is tuned toward the kinds of answer rated highly. Related methods reward a model for solving problems that can be checked automatically, such as code that passes its tests.
Where does it go wrong?
A system optimises exactly the reward it is given, not the outcome you had in mind. Reward clicks and it learns clickbait. Reward short support calls and it learns to end them early. Designing a reward that cannot be gamed is the hard part.