Reinforcement learning. What it means.

Reinforcement learning is a type of machine learning in which a system learns by trial and error: it takes actions, receives rewards or penalties, and adjusts to earn more reward over time.

By Brady Heinrich · Updated

Definition

Reinforcement learning is a type of machine learning in which a system learns by trial and error: it takes actions, receives rewards or penalties, and adjusts to earn more reward over time.

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.

PartMeaningExample: ad bidding
AgentThe learner that makes decisionsThe bidding system
EnvironmentWhat it acts onThe ad auction
StateThe situation it observesTime of day, audience, budget left
ActionA choice it can makeBid $1.20 on this impression
RewardFeedback on the resultA conversion, minus the cost
PolicyIts learned strategyWhich 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.

An example

An online retailer lets a reinforcement learning system choose which of four homepage layouts each visitor sees. At first it shows all four equally. As orders come in, it shifts traffic toward the layouts that earn more revenue per visit, while still testing the others occasionally. After three weeks, 70% of visitors see the best layout, and mobile visitors are served a different winner from desktop visitors.

The common mistake

Rewarding a proxy and expecting the real goal. The system will find the cheapest way to score, whatever that is. Tie the reward as closely as possible to the outcome you want, such as profit instead of clicks, and watch for behaviour that scores well and helps nobody.

How people search for reinforcement learning

  • reinforcement learning12,100 a month
  • what is reinforcement learning1,900 a month
  • reinforcement learning ai880 a month

US monthly searches, Google Ads keyword data.

Related terms

Go deeper

Building something ambitious? Let's talk.

We reply within one business day.