ENES

Reinforcement learning

Learning by trial and error, guided by rewards for good outcomes.

A loop between an agent and an environment: the agent sends an action, the environment sends back a new state and a reward

Reinforcement learning (RL) is a way of training AI where nobody shows the system the right answers. Instead, an agent acts in some environment (a game, a simulation, a conversation), gets a reward when things go well and a penalty when they go badly, and gradually learns which actions lead to more reward. It is trial and error, repeated millions of times.

Its most famous success came in 2016, when DeepMind's AlphaGo beat Lee Sedol, one of the world's best players of Go, a board game long thought too subtle for computers. AlphaGo improved partly by playing against itself over and over. RL is also used to train robots to walk or grasp, to control cooling in data centers, and in many game-playing systems.

For today's chatbots, RL matters in two ways. RLHF (reinforcement learning from human feedback) is a step where people compare pairs of answers, a separate model learns their preferences, and the chatbot is then trained to produce answers that preference model scores well. It is a big part of why assistants sound helpful and polite. More recently, RL on problems with checkable answers, like math and code, has been used to train models that reason step by step. The classic risk is reward hacking: the agent finds a loophole that earns points without doing what you actually wanted, so the reward has to be designed with care.

Keep in mind

Go deeper

Related terms

More in AI