Notes

Agent

An agent is the decision-maker in a reinforcement-learning system: the part that observes a situation, chooses what to do, and learns from the consequences. It could control a robot arm, play an Atari game, manage a traffic signal, or exist purely as code inside a simulator.

What the agent does

At each time step, the agent receives an observation of the environment, selects an action, then receives a reward and a new observation. Its goal is not merely to collect the next reward; it learns behavior that maximizes the return: the accumulated future reward, usually with distant rewards discounted.

  • A game-playing agent sees the screen and presses a button.
  • A warehouse-robot agent sees sensor readings and chooses a movement.
  • A trading agent sees market features and chooses to buy, sell, or wait.
The learning machinery inside

“Agent” describes a role, not one fixed algorithm. An agent commonly contains a policy, which maps observations or states to actions. It can also contain a value function, estimating how rewarding a situation or action will be in the future, and a learning rule that updates these components from experience. For example, DQN uses a neural network to estimate action values, while PPO directly improves a policy using rewards gathered from its own recent actions.

Why this role matters

Unlike supervised learning, an RL agent does not receive a labelled “correct action” for every situation. It must discover useful actions through interaction, while its choices determine which experiences it gets to learn from. This creates the exploration–exploitation problem: repeating a route that already earns reward versus trying an untested route that could reveal a better shortcut. A poorly designed agent can also exploit a flawed reward signal—for example, circling near a checkpoint because it earns points without completing the task. The agent is therefore the active learner in the feedback loop: its behavior changes the data, and that data changes its future behavior.

An agent is the decision-making entity in reinforcement learning: it observes information from an environment, selects actions, and learns from resulting rewards and subsequent observations. Its goal is to learn a policy that maximizes expected cumulative reward over time. The agent defines the source of behavior and data in the interaction loop, so its choices determine both performance and what it can learn.

Think of a dog learning a new trick. The dog is the one choosing what to do: sit, jump, paw, or wander off. A treat or praise tells it whether that choice worked well.

In reinforcement learning, the agent is that decision-maker. It might be a game-playing program, a robot, or software choosing which route to take. It looks at the situation, takes an action, and then experiences the result—good, bad, or neutral. Over time, it learns which choices tend to lead to better outcomes. The agent is not simply given a list of correct answers; it improves by acting and living with the consequences.