Landmark 2 stops to get here · leads to 3

Agent

In reinforcement learning, the learner and decision-maker that observes an environment, takes actions and adjusts its behaviour to maximize cumulative reward.

Your route here

2 stops · basics first
  1. Machine Learning ✓ understood

    Building systems that learn patterns from data instead of following hand-written rules, getting better at a task as they see more examples.

  2. Reinforcement Learning ✓ understood

    Learning through interaction with an environment, receiving rewards or penalties to learn optimal behavior policies.

  3. Agent · you are here ✓ understood

Picture it

Observe stateWhat the environment looks like…Choose actionPicked by the agent's policyEnvironment respondsThe world changesReceive rewardPlus the next stateUpdate policyLearn from the outcomeMaximize total reward
  1. 01 Observe state What the environment looks like now
  2. 02 Choose action Picked by the agent's policy
  3. 03 Environment responds The world changes
  4. 04 Receive reward Plus the next state
  5. 05 Update policy Learn from the outcome

↺ back to 01 · Maximize total reward

Each pass through the loop, the agent acts, sees the reward, and adjusts its policy toward higher cumulative reward.

In reinforcement learning, the agent is the learner and decision-maker. It observes the state of an environment, takes an action, receives a reward and the next state, and over many rounds learns to act in ways that earn the most reward in total. A program learning to play Atari games, a robot arm learning to grasp, and a thermostat controller learning to save energy are all agents in this sense.

This is the older, technical meaning of the word. It is related to, but not the same as, an AI agent: a large language model running in a loop with tools. An LLM-based AI agent usually isn’t learning from rewards while it works; it is following instructions. The two meet when LLMs are trained with reinforcement learning, where the model plays the RL agent during training.

The boundary that defines it

Sutton and Barto’s textbook draws a sharp line: anything the agent can’t change arbitrarily counts as part of the environment. A robot’s motors and sensors are environment; so is the reward calculation. The agent is only the part that decides. That split keeps the problem clean. The agent controls actions, the environment controls consequences, and the reward is the single number that says how things are going.

What’s inside

The diagram’s loop has one moving part that learning changes: the policy, the rule the agent uses to pick actions. Depending on the method, an agent may also carry:

  • A value function, estimating how much future reward a state or action is worth.
  • A model of the environment, predicting what happens next, which lets it plan by imagining outcomes before acting. Model-based agents have one; model-free agents learn from experience alone.

DeepMind’s DQN is a well-known model-free agent: a single network that learns from screen pixels and the game score. A 2015 follow-up ran the same agent, unchanged, across 49 Atari games.

The hard parts

An agent faces problems that supervised learning doesn’t. Nobody tells it the right action, only how well things went, often many steps later, so it has to work out which earlier choices deserved the credit. It must balance trying new actions against repeating ones that worked (exploration vs. exploitation). And it optimizes the reward literally: if the reward can be earned in an unintended way, a capable agent will tend to find it.

Where it sits

Explore nearby

Sources

  1. Richard S. Sutton and Andrew G. Barto, Reinforcement Learning: An Introduction . 2nd edition, MIT Press, 2018; section 3.1, The Agent–Environment Interface
  2. Mnih et al., "Human-level control through deep reinforcement learning" . Nature, 2015