Autumn 2022-2023

Stanford University

Stanford's CS 221 course teaches foundational principles and practical implementation of AI systems. It covers machine learning, game playing, constraint satisfaction, graphical models, and logic. A rigorous course requiring solid foundational skills in programming, math, and probability.

The goal of artificial intelligence (AI) is to tackle complex real-world problems with rigorous mathematical tools. In this course, you will learn the foundational principles and practice implementing various AI systems. Specific topics include machine learning, search, Markov decision processes, game playing, constraint satisfaction, graphical models, and logic.

This course is fast-paced and covers a lot of ground, so it is important that you have a solid foundation in a number of areas. Here are the basic skills that you need and the classes that teach those skills:

- Programming (ideally Python): CS 106A, CS 106B, CS 107
- Discrete math, mathematical rigor: CS 103
- Probability: CS 109
- Linear algebra: Math 51

It is less important that you know particular things (e.g., we don't use eigenvectors in this course even though that's a pillar of any linear algebra course), and more important that you've done enough related things that you feel at ease with it. While it is possible to fill in the gaps, this course does move quickly, and ideally you want to be focusing your energy on learning AI rather than catching up on prerequisites. We have made a few prerequisite modules that you can review to refresh your memory, and the first homework (foundations) will allow you to also get some practice on these basics.

No data.

There are no required textbooks for this class, and you should be able to learn everything from the lecture notes and homeworks. However, if you would like to pursue more advanced topics or get another perspective on the same material, here are some great resources:

- Russell and Norvig. Artificial Intelligence: A Modern Approach. A comprehensive reference for all the AI topics that we will cover.
- Koller and Friedman. Probabilistic Graphical Models. Covers factor graphs and Bayesian networks (this is the textbook for CS228).
- Sutton and Barto. Reinforcement Learning: An Introduction. Covers Markov decision processes and reinforcement learning (free online).
- Hastie, Tibshirani, and Friedman. The Elements of Statistical Learning. Covers machine learning from a rigorous statistical perspective (free online).
- Tsang. Foundations of Constraint Satisfaction. Covers constraint satisfaction problems (free online).

Note that some of these books use different notation and terminology from this course, so it may take some effort to make the appropriate connections.

AC-3 algorithmAlpha-beta pruningBackpropagationBacktracking searchBayesian networkBig-O notationBreadth-first search (BFS)CompletenessComputation graphsComputational complexityConditional distributionContinuous optimizationContradictionCross-validation (statistics)Deep Reinforcement LearningDeep learning models compositionDepth-first search (DFS)Design and organization of featuresDice gameDiscounting factorDiscrete random variablesDot productDynamic programmingEntailmentEpsilon-greedy explorationEquitable performanceExhaustive searchFactor graphsFirst-order logicFunction approximationGame theoryGeneralizationGeometric interpretationsGibbs samplingGradient descentHalving gameHidden Markov Model (HMM)Hinge lossHistories of AIHorn clausesK-means clusteringLaplace smoothingLinear classificationLinear regressionLogicLoss minimizationMachine learningMarginal distributionsMarkov Decision Process (MDP)Markov random fieldMaximum Likelihood Estimation (MLE)MeanMinimax algorithmModel checkingModel-based Monte CarloModel-free Monte CarloModus ponensNash equilibriumNeural networkNon-linear functionsObjective functionsPolicy evaluationProbability distributionsPropositional calculus (Propositional logic)PythonQ-learningRecurrence relationReinforcement learning (RL)Relaxed search problemsSatisfiabilitySearch problemSkolem functionsSocietal impacts of AISoundnessState–action–reward–state–action (SARSA)Stochastic gradient descent (SGD)Substitution (logic)Taking gradientsTemporal difference (TD) learningTransportation problemUCS correctnessUCS heuristicsUnification (computer science)Uniform cost search (UCS)Value iterationVariable-based modelsVarianceVector (mathematics and physics)