Vol 13: AI and Machine Learning
This volume moves from search, probability, and reinforcement learning into supervised learning, deep models, LLMs, and production systems. Model metrics stay attached to splits, baselines, risk slices, and deployment contracts; one high score gets no diplomatic immunity.
Prerequisites
- Search and logic require basic Python, sets, and graphs. Probability and learning use conditional probability, vectors, matrices, and derivatives.
- Deep learning and LLM lessons build on training, data splits, and evaluation. When using a later lesson as a reference, revisit the relevant foundations as needed.
Coverage
Choose by task: chapters 1–3 cover search and reasoning, chapters 4–8 train statistical models, chapters 9–11 explain neural networks, and chapters 12–14 build and operate LLM applications.
Chapter 1: Search and games
- 1.1 State Space, BFS, DFS, and Uniform Cost Search: First, define what counts as the same state
- 1.2 A* and Heuristics: The Estimate Must Speak the Same Language as the Cost Model
- 1.3 Minimax, Alpha-Beta, and Uncertainty: Opponents Are Also Making Choices
Chapter 2: Logic, constraints, and probability
- 2.1 Propositional Logic, Horn Rules, and First-Order Representation: Logical Derivation Does Not Imply Truth
- 2.2 CSP, Constraint Propagation and Backtracking: Eliminate the Impossible First, Then Try Assignments
- 2.3 Bayesian Networks, Conditional Independence, and Inference: Arrows Do Not Automatically Imply Causation
Chapter 3: Reinforcement learning
- 3.1 MDP, Rewards, and Bellman Equations: The State Must Retain Information Needed to Predict the Future
- 3.2 Temporal-Difference, Q-Learning, and Exploration: One Update Does Not Mean You've Learned
- 3.3 Policy Gradient, Actor-Critic, and Safety Evaluation: Optimizing Rewards Also Optimizes Reward Vulnerabilities
Chapter 4: Supervised learning and data boundaries
- 4.1 From Business Decisions to Supervised Learning Tasks: Labels Are Just Measurements of the Target
- 4.2 Data Splitting, Cross-Validation, and Leakage: The Evaluation Set Must Simulate the Unknown Data the Model Will Encounter
- 4.3 Generalization, Learning Curves, and Regularization: Low Training Error Only Proves Optimization Succeeded
Chapter 5: Linear models and optimization
- 5.1 Linear Regression, Design Matrices, and Least Squares: Linearity Refers to Parameters, Not Input Being Limited to Straight Lines
- 5.2 Logistic Regression, Log Loss, and Thresholds: Probability Models and Action Rules Are Two Layers
- 5.3 Gradients, Condition Numbers, and Regularization Paths: What You Converge To Matters More Than How Many Steps You Take
Chapter 6: Trees and ensembles
- 6.1 Decision Trees, Splitting Criteria, and Pruning: Each Leaf Is a Local Constant Region
- 6.2 Bagging, Random Forests, and OOB: How Error Correlation Limits Averaging
- 6.3 Gradient Boosting and XGBoost: Each New Tree Fits the Direction of Current Loss Reduction
Chapter 7: Clustering, dimensionality reduction, and anomalies
- 7.1 Clustering, Distance, and Stability: Algorithms Find the Groupings Preferred by the Objective Function
- 7.2 PCA, SVD, and Visualization: Explaining Variance Does Not Equal Preserving Task Information
- 7.3 Anomaly Detection, Novelty, and Thresholds: Anomaly Scores Only Matter After Entering the Response Workflow
Chapter 8: Evaluation and model selection
- 8.1 Metrics, Probability, and Decision Thresholds: Model Scores and Business Actions Are Not the Same Layer
- 8.2 Splitting, Cross-Validation, and Uncertainty: Validation Structure Must Mirror Deployment Structure
- 8.3 Hyperparameter Search and Final Evaluation: The Larger the Search Budget, the Greater the Risk of Overfitting the Validation Process
Chapter 9: Neural-network training
- 9.1 Affine Layers, Activation, and Logits: Depth Comes from Function Composition, Not from the Name "Neuron"
- 9.2 Computation Graphs, Backpropagation, and Autograd: Gradients Add at Branches and Multiply Along Paths
- 9.3 Initialization, Optimization, and the Training Loop: Loss Reduction Is Just the First Vital Sign of a Training System
Chapter 10: Deep architectures and attention
- 10.1 Convolution, Receptive Fields, and Residual Connections: Embedding Spatial Structure into Parameter Sharing
- 10.2 RNN, LSTM, and BPTT: State Can Carry Context, But Also Leak
- 10.3 Scaled Dot-Product and Multi-Head Attention: First, Get the Mask Semantics Right
- 10.4 Transformer Architecture and Position: Parallelism in Training, Not in Autoregressive Generation
Chapter 11: Pretraining, fine-tuning, and prompting
- 11.1 Tokenizer, Special Tokens and Long Text Chunking: What the Model Sees Are Token IDs, Not Raw Text
- 11.2 Causal, Masked, and Denoising Pretraining: Self-supervised Labels Come from Data, Not from the Absence of Assumptions
- 11.3 Full-Parameter Fine-Tuning, LoRA, and Domain Adaptation: Fewer Trainable Parameters Do Not Reduce Risk and VRAM in Proportion
- 11.4 Prompt, In-Context Learning, and Structured Output: Strings Can't Control Permission Boundaries
Chapter 12: LLM post-training and applications
- 12.1 Preference-Based Post-Training: SFT, Reward Models, RLHF, and DPO
- 12.2 RAG: From Document Ingestion, Mixed Retrieval to Citation Verification
- 12.3 Tools and Agents: Execution State Machines Controlled by Host Programs
- 12.4 LLM Evaluation and Observability: From Sample Scoring to Release Decisions
Chapter 13: Risk, fairness, and security
- 13.1 AI Risk Governance and Impact Assessment: First Decide Whether to Deploy
- 13.2 Fairness, Explainability, and Appealability: Metrics Can't Decide What Harm Means
- 13.3 AI and LLM Security: From Data Poisoning to Tool Privilege Escalation
- 13.4 Red Team, Validation, and Incident Response: Turning Discoveries into Continuous Control
Chapter 14: Inference serving and production operation
- 14.1 LLM Inference Service: Prefill, Decode, KV Cache, and Capacity
- 14.2 Model Gateway and Routing: Capabilities, Policies, Fallback, and Version Contracts
- 14.3 AI System Caching: Keys, Permissions, Versions, and Expiry
- 14.4 Production Reference Architecture: SLOs, Change Units, Degradation, and Rollback
Outcomes
- Use state, objectives, and data generation to choose among search, supervised learning, and policy learning.
- Design splits and controlled experiments to separate optimization failure, poor generalization, and leakage.
- Define retrieval permissions, tool execution boundaries, evaluation gates, and rollback conditions for LLM applications.
How to use this map
Read in order when the topic is new. For review, start from a chapter heading, open the smallest relevant lesson, and verify its completion check before moving on.