The Reinforcement Learning Paradigm
The Reinforcement Learning Paradigm
When a child learns to ride a bicycle, nobody hands her a manual specifying which muscle fibers to activate at each moment. She does not receive labeled examples of "correct" versus "incorrect" pedaling techniques. Instead, she experiences the world directly: she pushes the pedals, wobbles, falls, gets up, adjusts her balance, and gradually discovers how to stay upright. Through trial and error accumulated over many attempts, she builds an intuitive understanding of how her actions translate into consequences in a physical environment. This fundamental mode of learning through interaction with consequences is precisely what reinforcement learning (RL) formalizes and automates.
Reinforcement learning represents one of the three fundamental paradigms of machine learning, alongside supervised learning and unsupervised learning. Yet it differs from its counterparts in a philosophically significant way: while supervised learning learns from curated examples provided by a teacher, and unsupervised learning discovers patterns in unlabeled data, reinforcement learning learns from the consequences of actions within an environment. This distinction is not merely technical—it reflects a fundamentally different conception of how intelligent systems can acquire knowledge about the world.
The conceptual framework we will explore in this chapter establishes the foundations upon which the entire edifice of reinforcement learning theory and practice rests. We begin with the agent-environment interaction model, which provides the mathematical scaffolding for describing learning problems. From this foundation, we will introduce the essential terminology that permeates every subsequent chapter: states, actions, rewards, policies, value functions, and models. We will examine how reinforcement learning relates to and differs from other machine learning paradigms, providing you with the contextual understanding necessary to recognize when an RL approach is appropriate. A journey through the historical development of the field—from early work in adaptive control theory through the groundbreaking temporal difference methods to the modern deep reinforcement learning revolution—will illuminate why the field developed as it did and where it stands today.
Throughout this exploration, we will confront the unique challenges that distinguish reinforcement learning from conventional machine learning problems: the credit assignment problem that asks which of our past actions truly deserved credit for our current success, the exploration-exploitation dilemma that forces every learning agent to balance gathering new information against acting on what it already knows, and the sequential decision-making nature of most RL problems where actions have long-lasting consequences that extend far into the future.
By the conclusion of this chapter, you will possess not only the vocabulary and conceptual toolkit necessary for the mathematical chapters that follow but also an intuitive understanding of what makes reinforcement learning a distinctive and powerful approach to building intelligent systems. The examples we examine—from classic control problems to contemporary achievements in game playing and robotics—will ground these concepts in real-world applications, demonstrating that the theory we develop has direct practical relevance.
The Agent-Environment Interaction Model
At the heart of reinforcement learning lies a remarkably elegant abstraction: the agent-environment interaction model. This model strips learning problems down to their essential components, capturing the fundamental dialog between a learner and the world it inhabits. Understanding this model thoroughly is critical, as it provides the conceptual framework within which every RL algorithm, every theoretical result, and every practical application operates.
An agent is the learner or decision-maker—the entity that chooses actions based on its observations of the environment. The environment is everything outside the agent: the world with which it interacts, including the physical systems, other agents, and external factors that influence outcomes. The agent-environment boundary is a modeling decision rather than a physical fact. When building an RL system for playing chess, for instance, we typically consider the agent to be the algorithm making decisions and the environment to include both the opponent and the rules of the game. In a robotics application, the agent might be the control software while the environment encompasses the robot's physical body and the task space in which it operates.
The interaction between agent and environment unfolds over discrete timesteps, though we will later extend our treatment to continuous time as well. At each timestep $t$, the agent receives a representation of the environment's current state, which we denote $S_t$. This state information may be complete or partial, deterministic or stochastic, but it constitutes the agent's entire knowledge base about the world at that moment. Based on this state, the agent selects an action $A_t$ according to its current decision-making policy.
$$\pi(a|s) = \mathbb{P}(A_t = a | S_t = s)$$
The policy $\pi$ is a mapping from states to probabilities over actions—it specifies, for each possible state, the probability (or in deterministic policies, the certainty) with which the agent will select each available action. Policies are central to reinforcement learning because improving the policy is the ultimate goal of learning. An RL algorithm seeks to find or approximate the optimal policy $\pi^*$ that maximizes the expected cumulative reward the agent receives.
After executing its action, the agent receives a reward signal $R_{t+1}$ and observes the next state $S_{t+1}$. This reward is a scalar feedback signal that indicates how well the agent is doing at timestep $t$. The reward is not a signal about the long-term desirability of the agent's state—that is the domain of value functions, which we will explore shortly. Rather, the reward is the immediate signal telling the agent how good or bad the immediate outcome of its last action was.
The sequence of interactions continues: $S_0, A_0, R_1, S_1, A_1, R_2, S_2, A_2, R_3, \ldots$. This trajectory of state-action-reward triplets constitutes the raw data from which the agent learns. The goal of the agent is to maximize the cumulative reward it receives over the long run, not just the immediate reward from each individual action.
Consider a concrete example that illustrates these concepts: a robot navigating a grid world to reach a goal location. The state at each timestep is the robot's position on the grid, encoded perhaps as $(x, y)$ coordinates. The available actions are movements in the four cardinal directions (up, down, left, right) or possibly a stay-in-place action. The reward function might assign $R = 100$ when the robot reaches the goal, $R = -1$ for each step taken to encourage efficiency, and $R = 0$ otherwise. The policy maps each grid position to a probability distribution over the four movement directions. Through learning, the agent discovers which actions lead most reliably to goal-reaching from each starting position, and this knowledge becomes encoded in an improved policy.
The agent-environment interaction model is remarkably general. It encompasses not only the grid world example but also tasks as diverse as playing Atari games (where the state is the game screen pixels, actions are controller inputs, and the reward is the game score), controlling a robotic arm to manipulate objects (state includes joint angles and sensor readings, actions are motor commands, reward reflects task completion), or managing an investment portfolio (state encodes market conditions, actions are buy/sell/hold decisions, reward is the financial return).
A crucial feature of this model is its assumption that the agent's actions influence the sub