Table of Contents

From vibe coding as a rigorous engineering discipline to autonomous AI scientists.

First Edition · 2026

7 parts · 58 chapters, plus front matter, appendices, and six capstone tracks. The Discovery Workbench platform grows through every chapter.

Front Matter

5 entries
  1. F1
    Why This Book ExistsDiscovery as the common thread across software engineering, scientific research, and autonomous AI.
  2. F2
    What This Book CoversThe seven-part arc: foundations, vibe coding, data and models, knowledge, simulation, domains, and autonomous systems.
  3. F3
    Who Should Read This BookThree personas: the software engineer building research tools, the scientist or researcher who wants rigorous theory and working code, and the domain expert adding AI to a scientific workflow.
  4. F4
    About the AuthorsAlexander (Sasha) Apartsin, Ph.D. and Yehudit Aperstein, Ph.D.
  5. F5
    About the Hands-On AI Science SeriesSeven deep, build-it-yourself guides to the major fields of artificial intelligence.

Part I · Foundations of Discovery AI

6 chapters

Discovery as search, inference, optimization, and experimentation. The scientific, mathematical, and architectural foundations all later chapters build on.

  1. 1
    Discovery as Search State spaces, action spaces, heuristics, information gain, exploration versus exploitation, and the unified view of discovery as search through hypothesis space.
  2. 2
    Scientific Discovery and Knowledge Creation The philosophy and practice of scientific method: hypothesis generation, experiment design, falsification, paradigm shifts, and the computational analogy.
  3. 3
    Knowledge Representation Ontologies, knowledge graphs, semantic embeddings, property graphs, and the formal structures that let AI systems reason over scientific knowledge.
  4. 4
    Reasoning for Discovery Deductive, inductive, and abductive reasoning; probabilistic and causal inference; chain-of-thought as computational reasoning; formal verification.
  5. 5
    Discovery Through Data, Models, and Simulation Data-driven discovery, model-based discovery, and simulation-based inference as three complementary discovery paradigms.
  6. 6
    Discovery System Architecture The Discovery Workbench: components, data flows, artifact stores, agent loops, evaluation harnesses, and the architecture that carries the entire book.

Part II · Discovery Through Software Engineering and Vibe Coding

18 chapters

Vibe coding as a rigorous discipline: specification, steering, verification, and repair. From a first coding agent to fully autonomous software organizations.

  1. 7
    Software Development as a Discovery Process Requirements, architecture, and algorithms as a search problem. The parallel between scientific discovery and software engineering.
  2. 8
    Foundations of AI-Assisted Software Engineering Code LLMs, code completion, code search, and the modern AI coding stack. Models: Codex, Claude, Gemini, GPT-4o, Qwen2.5-Coder.
  3. 9
    Vibe Coding as Specification, Steering, Verification, and Repair The four-step vibe coding loop. Writing effective specifications, steering toward correctness, verifying outputs, and repairing failures. Not a shortcut: a discipline.
  4. 10
    Prompting to Programming Prompt engineering for code generation: chain-of-thought, few-shot examples, structured outputs, tool use, and the systematic approach to getting code you can trust.
  5. 11
    Context Engineering at Repository Scale Building and managing context windows for large codebases: retrieval, indexing, summarization, and the art of giving an AI agent exactly the context it needs.
  6. 12
    Building MCP Servers for Scientific Workflows The Model Context Protocol standard. Building MCP servers that expose scientific databases, instruments, and compute resources to AI agents.
  7. 13
    Discovery of Requirements AI-assisted requirements elicitation, specification synthesis, and formal verification of requirements. From ambiguous goals to testable acceptance criteria.
  8. 14
    Discovery of Architectures Neural architecture search, program synthesis, and AI-guided system design. Searching the space of architectures with reinforcement learning and evolutionary methods.
  9. 15
    Discovery of Algorithms AI-assisted algorithm design: FunSearch, AlphaDev, program synthesis for combinatorial problems, and the emerging field of AI-discovered algorithms.
  10. 16
    AI-Assisted Implementation at Repository Scale Agentic coding across large repositories: navigating, editing, refactoring, and maintaining codebases with AI agents. SWE-bench Verified as the evaluation standard.
  11. 17
    Multi-Agent Software Teams Orchestrating multiple specialized agents: planner, coder, reviewer, tester, and deployer. Communication protocols, shared memory, conflict resolution, and team evaluation.
  12. 18
    AI-Assisted Testing and QA Generating tests, fuzzing, property-based testing, mutation testing, and AI-driven coverage analysis. Building test suites alongside AI-generated code.
  13. 19
    AI-Assisted Debugging Root cause analysis, fault localization, trace analysis, and automated repair. Teaching agents to diagnose errors systematically rather than guess-and-check.
  14. 20
    AI for Software Security Vulnerability detection, secure code generation, formal verification, and adversarial robustness. AI as both attacker and defender in software security.
  15. 21
    AI for DevOps and Platform Engineering AI-assisted CI/CD, infrastructure-as-code generation, incident response, log analysis, and the intelligent platform engineering stack.
  16. 22
    MLOps, LLMOps, and AgentOps Model registries, experiment tracking, deployment pipelines, prompt versioning, agent observability, and the full operations stack for AI-powered research systems.
  17. 23
    Evaluating AI Coding Agents Benchmarks: SWE-bench Verified, HumanEval, MBPP, DS-1000, BigCodeBench. Designing rigorous evaluations that predict real-world coding agent performance.
  18. 24
    Autonomous Software Organizations The trajectory from tool to team: coding agents managing their own roadmaps, issue trackers, and deployment pipelines. Governance, oversight, and the human-in-the-loop.

Part III · Discovery Through Data and Models

11 chapters

Scientific foundation models, multimodal AI, reasoning models, and generative models for molecular design. The machine learning toolkit of the AI scientist.

  1. 25
    Exploratory Discovery Dimensionality reduction, clustering, anomaly detection, and exploratory data analysis as discovery tools. Finding structure before you know what structure to look for.
  2. 26
    Representation Learning Self-supervised and contrastive learning for scientific data. Learning representations for molecules, proteins, genomic sequences, and scientific text that transfer across tasks.
  3. 27
    Scientific Foundation Models ESM-3 for proteins, AlphaFold3 (2024 Nobel Prize context), GNoME for materials, Uni-Mol2 for molecules, Evo2 for DNA. Architecture, training, fine-tuning, and benchmarks.
  4. 28
    Multimodal Scientific AI Bridging modalities: text, molecular structure, protein sequence, spectral data, microscopy images, and scientific figures. Vision-language models for scientific reasoning.
  5. 29
    Reasoning Models for Discovery o1/o3, Gemini Deep Think, AlphaProof, AlphaGeometry 2, DeepSeek-R1. Chain-of-thought, process reward models, and formal reasoning with Lean4 and mathlib4.
  6. 30
    Anomaly and Novelty Discovery Statistical and neural anomaly detection, novelty scoring, out-of-distribution detection, and using anomaly signals as discovery triggers in scientific data streams.
  7. 31
    Causal Discovery and Causal Inference Structure learning, do-calculus, instrumental variables, and difference-in-differences. Building causal graphs from observational scientific data.
  8. 32
    Bayesian Discovery and Uncertainty Bayesian inference, MCMC, variational inference, Gaussian processes, and calibrated uncertainty. Making discovery claims that quantify what we do not know.
  9. 33
    Scientific Machine Learning Physics-informed neural networks, neural ODEs, operator learning, and hybrid physics-ML models. When physical law is prior knowledge, not a constraint to ignore.
  10. 34
    Generative Models for Discovery Diffusion models (EDM, DiffSBDD, DiffDock-L, RFDiffusion2), flow matching (FoldFlow2, Boltz-1, Chai-1), and equivariant SE(3) architectures for molecular, protein, and material generation.
  11. 35
    Symbolic Regression and Equation Discovery Discovering mathematical laws from data. Genetic programming, neural symbolic regression, PySR, AI Feynman, and the frontier of AI-discovered equations.

Part IV · Discovery Through Knowledge

6 chapters

Literature at scale, retrieval-augmented discovery, knowledge graphs, hypothesis generation, and research agents. The full knowledge infrastructure for AI-assisted science.

  1. 36
    Literature Mining Named entity recognition, relation extraction, claim extraction, citation network analysis, and systematic review automation across millions of papers with PaperQA2 and similar systems.
  2. 37
    Retrieval-Augmented Discovery Systems RAG architectures for scientific corpora: dense retrieval, hybrid search, evidence grounding, hallucination detection, and citation-backed claim generation.
  3. 38
    Knowledge Graph Discovery Building, populating, and querying scientific knowledge graphs. Link prediction, entity alignment, reasoning over incomplete graphs, and the Unified Medical Language System as a case study.
  4. 39
    Hypothesis Generation Computational creativity and abductive reasoning for science. Generating, ranking, and filtering novel hypotheses with LLMs, knowledge graphs, and structured search over idea space.
  5. 40
    Research Agents ChemCrow, Atlas/ChemOS 2.0, and research agent architectures. Tool use, memory, planning, and the agent loop for scientific research. ScienceAgentBench (NeurIPS 2024) as the evaluation framework.
  6. 41
    Scientific Claim Validation Automated fact-checking, evidence aggregation, replication checking, and statistical validity assessment. Building pipelines that distinguish strong from weak scientific claims.

Part V · Discovery Through Simulation and Optimization

6 chapters

Differentiable programming, scientific simulation, world models, Bayesian optimization, automated experiment design, and provenance. The computational machinery of discovery.

  1. 42
    Differentiable Programming for Discovery JAX, Equinox, diffrax, and JAX-MD. Automatic differentiation through physical simulations, molecular dynamics, and scientific programs. Physics-informed discovery via gradient flow.
  2. 43
    Scientific Simulation Molecular dynamics, Monte Carlo methods, finite element methods, and agent-based models as discovery tools. When and how to replace physical experiments with computational ones.
  3. 44
    World Models for Discovery Learning compressed models of physical and biological systems. Planning with world models, counterfactual reasoning, and using learned simulators to guide experiment selection.
  4. 45
    Optimization for Discovery Bayesian optimization, evolutionary strategies, and reinforcement learning for scientific design. Optimizing molecular properties, experimental conditions, and research strategies.
  5. 46
    Automated Experiment Design Active learning, optimal experimental design, and closed-loop experiment planning. Choosing the next experiment to run based on current knowledge and uncertainty.
  6. 47
    Experiment Registries and Scientific Provenance MLflow, Weights & Biases, and domain-specific registries. Tracking experiments, data lineage, model artifacts, and the full provenance chain for reproducible science.

Part VI · Discovery in Scientific Domains

5 chapters

Deep application chapters: the AI toolkit deployed in biology, chemistry, physics, climate science, and social systems. Domain models, benchmarks, and end-to-end recipes.

  1. 48
    Discovery AI for Biology and Medicine Drug discovery, genomics, single-cell analysis, clinical trial design, and AI-assisted diagnosis. AlphaFold3, ESM-3, and the 2024 Nobel Prize in Chemistry as the anchor case study.
  2. 49
    Discovery AI for Chemistry and Materials Molecular generation, retrosynthesis, reaction prediction, and materials design. GNoME, MatterGen, CDVAE, MACE-MP-0, and CHGNet for the materials discovery pipeline.
  3. 50
    Discovery AI for Physics and Engineering Symbolic regression for physical laws, surrogate models for simulations, neural solvers for PDEs, and AI in particle physics, astronomy, and structural engineering.
  4. 51
    Discovery AI for Climate and Earth Science Climate emulators, extreme weather prediction, carbon cycle modeling, and Earth observation analysis. GraphCast, Pangu-Weather, and the AI4Science agenda for Earth systems.
  5. 52
    Discovery AI for Social and Economic Systems Agent-based social simulation, causal inference in economics, NLP for social science, and the unique methodological challenges of discovery in complex adaptive systems.

Part VII · Autonomous Discovery Systems

6 chapters

AI scientists, multi-agent discovery teams, self-driving laboratories, system evaluation, governance, and the research frontier of autonomous science.

  1. 53
    AI Scientists The AI Scientist v1/v2 (SakanaAI), Google AI Co-Scientist (DeepMind 2025), Coscientist (Nature 2023). Architecture, evaluation, and the frontier of fully autonomous research systems.
  2. 54
    Multi-Agent Discovery Systems Orchestrating teams of specialized research agents: literature agents, hypothesis agents, experiment agents, and analysis agents. Coordination, conflict resolution, and emergent discovery.
  3. 55
    Self-Driving Laboratories Closed-loop robotic experimentation: liquid handling, analytical instruments, feedback control, and AI orchestration. The fully automated lab as the endpoint of the discovery arc.
  4. 56
    Evaluating Discovery Systems DiscoveryBench, MLE-bench, ScienceAgentBench, and FrontierMath. Designing evaluations that measure genuine discovery capability, not benchmark memorization.
  5. 57
    Responsible Discovery AI Dual-use risks, biosecurity, attribution of AI-generated discoveries, reproducibility mandates, and the governance frameworks needed for autonomous research systems.
  6. 58
    Future Directions Open problems, emerging paradigms, and the research frontier: from hybrid human-AI discovery to fully autonomous science and the long arc toward artificial general intelligence for research.

Appendices · Reference and Pedagogy

2 appendices
  1. A
    Reading PathsGraduate Research Path, Software Practitioner Path, and Domain Scientist Path with chapter-by-chapter schedules.
  2. B
    Discovery Workbench ReferenceComplete API reference and component inventory for the Discovery Workbench platform built across all 58 chapters.

Capstone Tracks · Six End-to-End Projects

6 tracks
  1. Track A: AI Research AssistantBuild a full-stack AI research assistant for a scientific domain of your choice, end to end from literature ingestion to evidence report.
  2. Track B: Autonomous Coding OrganizationDeploy a multi-agent software engineering team capable of autonomous feature development across a real repository.
  3. Track C: Molecular Discovery PipelineEnd-to-end generative pipeline from target specification to synthesizable candidate molecules, evaluated against known benchmarks.
  4. Track D: Scientific Knowledge SystemBuild a hypothesis-generating knowledge graph over a domain corpus, with claim validation and ranked hypothesis output.
  5. Track E: Generative Discovery SystemDesign and evaluate a generative model for a scientific design task: molecules, materials, protein sequences, or experimental conditions.
  6. Track F: Multimodal Science PlatformBuild a multimodal scientific reasoning system that connects text, molecular structure, image, and tabular data for a domain of your choice.