Picture teaching a child to ride a bike: they try, fall, adjust, and each small success brings them closer to balance. Reinforcement Learning (RL) rests on exactly this idea: an agent learns to act within an environment by maximizing the rewards it receives, through repeated trial and error. Unlike supervised learning, no one hands it the "right answer" — it discovers that answer through experience.
The agent-environment loop
At each step, the agent observes a state ($s$), picks an action ($a$) according to its policy ($\pi$), and the environment returns a reward ($r$) and a new state. The goal is to maximize cumulative reward, weighted by a discount factor $\gamma \in [0,1]$ that favors the present over the distant future:
$$G_t = \sum_{k=0}^{\infty} \gamma^{k} \, r_{t+k+1}$$
The central challenge is the exploration / exploitation trade-off: should the agent exploit what it already knows, or explore to discover something better?
RL vs other paradigms
| Paradigm | Learning signal | Example |
|---|---|---|
| Supervised | Provided labels | Classifying images |
| Unsupervised | No target | Clustering data |
| Reinforcement | Delayed rewards | Playing chess |
Applications
- Games (Go, chess, video games)
- Robotics and motor control
- Fine-tuning large language models via RLHF (reinforcement learning from human feedback)
RL doesn't learn what to answer, but how to behave in order to reach a goal.