Overview
Every act of discovery, from identifying a new chemical compound to finding a bug in a million-line codebase, can be understood as search. This chapter formalizes that intuition. We define discovery as navigation through a space of states $S$ guided by actions $A$, a transition function $T$, an objective $f$, and constraints $C$. We derive the fundamental trade-off between exploration (gathering information) and exploitation (using what we know), quantify it through regret bounds and information gain, and build a working simulator that lets you watch four different search strategies compete on a synthetic discovery landscape.
By the end of this chapter, you will have both the mathematical vocabulary to reason about discovery as a formal process and the Python code to experiment with it. These foundations surface repeatedly throughout the book: search becomes reasoning in Chapter 4, optimization in Chapter 45, and automated experiment design in Chapter 46.
Prerequisites
This is the first chapter of the book. No prior chapters are required. We assume familiarity with Python programming (functions, classes, NumPy basics), undergraduate probability (expectation, variance, Bayes' theorem), and comfort reading mathematical notation. If you need a refresher, Appendix A: Mathematical Foundations and Appendix B: Python for Discovery AI cover everything you need.
Learning Outcomes
- Formalize discovery as search over a state space with actions, transitions, objectives, and constraints.
- Distinguish discovery, invention, and innovation, and map each to its search structure.
- Quantify the exploration/exploitation trade-off using regret, information gain, and entropy reduction.
- Derive Upper Confidence Bound (UCB) from first principles and connect it to Thompson Sampling.
- Model discovery workflows as state transition systems and identify where AI accelerates each step.
- Build a working discovery simulator in Python that compares random search, greedy search, UCB, and Thompson Sampling.
Sections
1.1 Discovery, Invention, and Innovation
Discovery, invention, and innovation as human activities. Search spaces, solution spaces, and objective functions. The formal tuple $(S, A, T, f, C)$ that structures every discovery problem.
1.2 Exploration Versus Exploitation
Utility, regret, information gain, and uncertainty. The multi-armed bandit as the simplest discovery model. UCB derivation and Thompson Sampling.
1.3 Discovery Workflows
Discovery workflows as state transition systems. Sequential, iterative, and branching workflows. The role of AI in accelerating search at each stage.
1.4 Building a Discovery Simulator
Recipe: build a discovery simulator comparing random search, greedy search, UCB, and Thompson Sampling on a synthetic multi-modal objective landscape.
Bibliography
Foundational Papers
The paper that introduced the UCB1 algorithm and proved its logarithmic regret bound, establishing the modern theory of multi-armed bandits.
The original Thompson Sampling paper, rediscovered decades later as one of the most effective bandit algorithms in practice.
A landmark book framing scientific discovery as heuristic search, introducing the BACON and GLAUBER programs.
DeepMind's GNoME system that discovered 2.2 million new crystal structures, a dramatic example of AI-accelerated search in materials science.
Books
The definitive modern reference on bandit algorithms, covering UCB, Thompson Sampling, and contextual bandits with full proofs.
The standard AI textbook, whose treatment of search algorithms (Chapters 3-5) provides essential background for this chapter.
Tools & Libraries
The foundation of numerical computing in Python. Every code example in this chapter uses NumPy for array operations and random number generation.
A Python library for creating and analyzing graphs and networks, used in this chapter to model state transition graphs in discovery workflows.
The plotting library used throughout this chapter to visualize search trajectories, regret curves, and discovery landscapes.
Tutorials & Surveys
An accessible survey of bandit algorithms that bridges theory and practice, excellent supplementary reading for Section 1.2.
A comprehensive review of AI for scientific discovery, providing context for how the search framework connects to real scientific applications.