Skip to main content

AI glossary Models & Architecture

What is reinforcement learning?

← All glossary terms
In short

A way of training an agent by trial and error: it takes actions, receives rewards or penalties, and learns to maximise the total reward over time.

Explained

Reinforcement learning (RL) is a branch of machine learning in which an agent learns by interacting with an environment. At each step it observes the situation, takes an action and receives a reward or penalty; over many trials it learns a policy that maximises cumulative reward. Unlike supervised learning, nobody gives it the right answer for each case; it has to discover which actions pay off, sometimes only after a long delay. RL is used in robotics, games, control and optimisation, and a variant that uses human feedback is a key step in training today's chat models.

How it works

  • Agent: the system that makes decisions.
  • Environment: the world it acts in, real or simulated.
  • State: what the agent observes at each moment.
  • Action: what it can do.
  • Reward: the signal that tells it how good the outcome was.
  • Policy: the strategy it learns, mapping states to actions.

A central tension is exploration versus exploitation: the agent must try new actions to find better ones, while still using what already works.

Reinforcement learning from human feedback

Large language models are first pre-trained to predict text, which does not make them good assistants. In reinforcement learning from human feedback (RLHF), people rank several answers of the model, a reward model learns those preferences, and RL then adjusts the language model to produce answers that score higher.

OpenAI used this approach to train InstructGPT, the predecessor of the models behind ChatGPT. Variants of it, and other ways of learning from preferences, are now common in training chat and agent models.

Where it is used in business

  • Operations and control: energy management, industrial processes, logistics.
  • Recommendation and personalisation, where actions affect future behaviour.
  • Pricing, bidding and resource allocation.
  • Robotics and autonomous systems, usually trained first in simulation.
  • Training and improving AI models and agents.

RL needs a clear reward and many trials, so it fits problems that can be simulated or that generate frequent feedback. Badly designed rewards can lead the agent to optimise the wrong thing.

Frequently asked questions

What is reinforcement learning in simple terms?

It is learning by trial and error. The system tries actions, gets a score for each outcome, and gradually learns which choices lead to the best results over time, much as a person learns a game by playing it.

What is the difference between reinforcement learning and supervised learning?

In supervised learning, the model learns from examples labelled with the correct answer. In reinforcement learning, there are no labelled answers; the agent receives rewards for its actions and must work out which sequence of actions leads to the best total reward.

What is RLHF?

RLHF stands for reinforcement learning from human feedback. People compare model outputs, a reward model learns their preferences, and reinforcement learning tunes the language model to match them. It is used to make chat models more helpful and better at following instructions.

Is ChatGPT trained with reinforcement learning?

Yes, in part. Its models are pre-trained on large amounts of text and then refined with supervised fine-tuning and reinforcement learning from human feedback, following the approach OpenAI described for InstructGPT.

Further reading

Sources

Updated: 2026-10-21

Want to see how this applies to your organisation?

Talk to an AI Expert