JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Learning by Doing: What Reinforcement Learning Is

The everyday intuition behind RL — try something, see how it turns out, and do more of what works.

A kind of learning you already know

Think about how a child learns to ride a bike, how you got good at a video game, or how a dog learns a new trick. Nobody hands over a rulebook with the right answer for every moment. Instead you try something, see what happens, and gradually do more of what works and less of what doesn't. That simple loop — act, observe the outcome, adjust — is the whole heart of reinforcement learning (RL).

This is different from being told the answer. In RL there is no teacher whispering "the correct move here is X." There is only feedback about how good or bad things turned out — and the learner has to figure out the rest. We call this trial-and-error learning, and it is the oldest and most natural way that animals and people learn.

Two characters: the agent and the environment

Every RL story has exactly two characters. The agent is the learner and decision-maker — the player, the dog, the robot, the program. The environment is everything the agent interacts with — the game world, the room, the road, the user on the other end of a chatbot. The agent acts; the environment reacts and reports back.

Keeping these two apart is the first mental move in RL. Anything the agent can decide is inside the agent; everything the agent cannot directly control — and can only influence through its actions — is the environment. Drawing that line clearly is what lets us reason precisely later on.

RL's two characters: the agent acts, and the environment answers with a new situation and a reward.

A loop diagram with an agent box and an environment box exchanging action, state, and reward arrows.

The reward: a single number that says "better" or "worse"

How does the agent know what "works"? Through a reward signal — a single number the environment hands back after the agent acts. Eat the food pellet: +1. Bump into a wall: -1. Win the game: +100. The agent's only job is to collect as much reward as it can over time. Everything RL does is in service of that one objective.

That reward defines what the agent is for. We call the behaviour that emerges goal-directed behaviour: the agent isn't told how to reach the goal, only what the goal is worth, and it learns its own way there. In fact one of the boldest claims in the field, the reward hypothesis, says that any goal we care about can be expressed as the maximisation of expected cumulative reward — a claim we'll examine closely later in this track.

G_t = R_{t+1} + R_{t+2} + \cdots + R_T

The goal in one line: maximize the total reward collected over time, not just the next number.

Putting it in one loop

Stitch the pieces together and you get the agent–environment interaction loop, the engine that runs over and over: the agent looks at the situation, picks an action, the environment changes and returns a reward, and around it goes again. Learning is nothing more than getting better at this loop with experience.

  1. The agent observes the current situation.
  2. It chooses an action.
  3. The environment moves to a new situation and returns a reward.
  4. The agent uses that feedback to act a little better next time — then repeat.
Try it: an agent learns a gridworld by trial and error, repeating the moves that earn reward.

An interactive gridworld where an agent moves cell to cell, with values updating as it learns from rewards.

Where we're headed

In the rest of this track we'll slow down and look at each piece of the loop in turn, see why rewards that arrive late make learning hard, contrast RL with the other kinds of machine learning you may have met, and tour the places RL is genuinely changing the world. No equations yet — just clear pictures you can carry into the more technical tracks that follow.

Where RL sits: alongside supervised and unsupervised learning as a third way to learn.

A diagram comparing supervised, unsupervised, and reinforcement learning side by side.