What is reinforcement learning?
Instead of giving a program a stack of labelled examples with correct answers, reinforcement learning drops it straight into a situation and says: try things, and I’ll tell you how you’re doing. An agent — the learner — acts inside an environment. Each action brings back a new state and a numerical reward: positive for moves that move it closer to a goal, negative for ones that don’t. There is no single right answer handed over; the agent works out a strategy over time by chasing the highest total reward it can accumulate. This makes it a distinct approach from supervised learning on labelled data.
How the learning loop works
The arrangement is simple. An agent observes the state of its world, picks an action, and the world sends back a new state plus a reward. The agent’s task is not just to grab the next reward but to maximise all future rewards — a trickier problem because a good move now might lead to a poor position later.
To manage this, the agent builds a policy: a rule that maps what it sees to what it does. At first the policy is random, but it improves by switching between two modes. Exploration tries unfamiliar actions to uncover their consequences; exploitation leans on actions already known to pay off. Algorithms like Q-learning or policy gradients automate this balancing act, letting the agent refine its behaviour over many episodes until its decisions become reliably effective — even in environments no human programmed directly.
How it differs from supervised and unsupervised learning
Most people first meet machine learning as supervised learning, where a model trains on examples paired with the right answer: photos marked “cat” or “dog”, for instance. The model learns to map inputs to fixed outputs. In unsupervised learning, the model finds hidden structure in unlabelled data, grouping similar items without being told what the groups mean.
Reinforcement learning does not work from a static answer sheet. The feedback is a reward signal that may arrive long after the action that earned it, making credit assignment hard. And there is rarely a single correct action — the right move depends on what happens next. That flexibility allows reinforcement learning to handle sequential decision problems the other styles cannot, like playing an entire game or controlling a robot leg across a changing surface.
Common uses of reinforcement learning
Reinforcement learning excels wherever an agent must act continuously and adjust to fresh information. Games have long been a proving ground: agents have learned Go, chess, and console titles at superhuman levels by playing against themselves across huge numbers of simulated matches. In robotics, the same principles help arms and legs master walking, grasping, or manipulating objects through physical trial and error. Streaming services treat each recommendation as an action and subscriber retention as the reward, letting the system tune suggestions as it goes.
The pattern shows up in less visible places too — traffic-light timing, energy-grid balancing, drug design, and automated trading all use it. The common thread is learning through interaction rather than static examples, which makes reinforcement learning a natural fit when the rules are known but the best path is anything but obvious.