Library
Reinforcement Learning

Foundations

Reinforcement Learning

Richard S. Sutton and Andrew G. Barto · MIT Press · 2nd edition, 2018

The argument

Sutton and Barto present reinforcement learning as a computational approach where an agent learns to maximize total reward through interaction with an uncertain environment. The book focuses on core online learning algorithms and builds them in order: first the tabular case where exact solutions exist, then approximation for large problems, then connections to psychology, neuroscience and real applications.

How the book is built

  1. 01

    Introduction

    Chapter 1

    Defines reinforcement learning, gives examples, and lays out the elements of the problem. It includes a section on limitations and scope, the tic-tac-toe extended example and an early history of the field.

  2. 02

    Tabular solution methods

    Chapters 2 to 8

    Multi-armed bandits (action-value methods, the 10-armed testbed, optimistic initial values, upper-confidence-bound selection, gradient bandits, contextual bandits); finite Markov decision processes; dynamic programming (policy evaluation, policy iteration, value iteration); Monte Carlo methods; temporal-difference learning (Sarsa, Q-learning, Expected Sarsa, double learning); n-step bootstrapping; and planning and learning with tabular methods. The publisher notes that UCB, Expected Sarsa and double learning are new to the second edition.

  3. 03

    Approximate solution methods

    Chapters 9 to 13

    On-policy prediction and control with approximation, off-policy methods with approximation, eligibility traces, and policy gradient methods. The publisher notes new material on artificial neural networks and the Fourier basis, and an expanded treatment of off-policy learning and policy gradients.

  4. 04

    Looking deeper

    Chapters 14 to 17

    Psychology, neuroscience, applications and case studies, and frontiers. The case studies chapter covers AlphaGo and AlphaGo Zero, Atari game playing and IBM Watson's wagering strategy, per the publisher.

Concepts worth keeping

Exploration versus exploitation

Introduced in the bandit chapter. An agent must try actions it is unsure about, and also use what it knows. Epsilon-greedy, optimistic initial values and UCB are different ways to balance the two.

Markov decision process

Chapter 3 defines the agent-environment interface, rewards, returns, policies and value functions. Everything later is a way to estimate or improve value functions or policies.

Bootstrapping

Dynamic programming and temporal-difference methods update an estimate from other estimates. Monte Carlo methods wait for the full return. The n-step chapter shows the range between the two.

On-policy versus off-policy learning

Sarsa learns about the policy it follows, and Q-learning learns about a different, greedy policy. The distinction returns with function approximation, where it affects stability.

Planning and learning together

Chapter 8 combines learning from real experience with planning from a model, within one framework.

Policy gradient methods

Chapter 13 learns the policy directly instead of through values. These are the base of many modern deep reinforcement learning methods.

What the author concludes

The final chapter, on frontiers, looks at open directions for the field. The book as a whole concludes that a small set of ideas (value functions, temporal-difference learning, bootstrapping, policy improvement) cover much of reinforcement learning, and that scaling them with function approximation is where the hard problems are.

Limits to keep in mind

  • It is a 2018 text. Deep reinforcement learning is covered through case studies and function approximation, but later methods and applications are outside it.
  • It covers online learning algorithms and leaves out batch and offline reinforcement learning as a main topic.
  • It is conceptual and mathematical, with little production engineering. Practical issues such as simulators, reward design in real systems and deployment are not its subject.

What I take into AI engineering work

  • Frame any sequential decision problem as states, actions, rewards and a discount before choosing an algorithm.
  • Think of bandits first. Many product problems (ranking, recommendation, A/B testing with adaptation) only need the bandit setting.
  • Know the on-policy and off-policy difference when reading about RLHF and policy optimization methods used to tune language models.
  • Treat reward specification as part of the engineering. The agent optimizes what you write, not what you mean.

Sources

My note

The book shows that credit assignment is the central difficulty: rewards arrive after the actions that earned them. The bandit chapter is the clearest place to see exploration against exploitation, because the problem is that small. Temporal-difference learning, which updates an estimate from another estimate without waiting for the episode to end, is the idea the rest of the book keeps building on.

Next bookDeep Learning