🌍 CS50x: Introduction to Computer Science · subject
CS50x: Introduction to Computer Science Artificial Intelligence Syllabus
Every chapter and topic of Artificial Intelligence examined in CS50x: Introduction to Computer Science — 3 chapters, 8 topics, plus 50 flashcards written against it.
Artificial Intelligence syllabus — full chapter and topic list
Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for Artificial Intelligence in CS50x: Introduction to Computer Science, not a summary of it.
-
Foundations of AI
2 topics- Decision Trees
- Minimax
-
Machine Learning
3 topics- Supervised Learning
- Reinforcement Learning
- Neural Networks
-
Large Language Models
3 topics- How LLMs Work
- Prompt Engineering
- Hallucinations and Limitations
Artificial Intelligence flashcards for CS50x: Introduction to Computer Science
21 of 50 cards from the Artificial Intelligence deck — real questions with worked answers.
In AI, what is a decision tree?
A model that reaches a decision by asking a sequence of questions: each internal node tests a condition, each branch represents an answer to that condition, and each leaf node represents a final decision or action.
How does a decision tree translate directly into code?
As nested conditional (if–elif–else) statements: each question in the tree becomes a condition, and each leaf becomes the action executed when the chain of conditions leads there.
Give the classic decision tree for a paddle-game AI (e.g., Breakout/Pong).
Ask: "Is the ball to the left of the paddle?" If yes, move the paddle left. Otherwise ask: "Is the ball to the right of the paddle?" If yes, move right. Otherwise, do not move.
What is the main limitation of hand-coded decision trees, and what does it motivate?
For complex problems the number of cases explodes, making it infeasible for a programmer to enumerate every rule by hand. This motivates machine learning, where the computer learns patterns from data instead of following explicitly written rules.
In a decision tree, what is the difference between an internal node and a leaf node?
An internal node contains a question or condition that splits into branches based on the answer; a leaf node is a terminal node containing the final decision, classification, or action with no further branching.
Contrast a hand-written decision tree with a machine learning approach to the same problem.
A decision tree encodes rules explicitly programmed by a human, so its behavior is fixed and interpretable. A machine learning model infers its own rules from data, so it can handle far more complex patterns but requires training data and may be less interpretable.
What is the minimax algorithm?
An algorithm for adversarial, turn-based games in which one player (MAX) tries to maximize the game's score while the opponent (MIN) tries to minimize it; the algorithm recursively explores possible moves to choose the optimal one assuming the opponent also plays optimally.
In minimax for tic-tac-toe, what utility values are typically assigned to terminal states?
A win for the maximizing player (X) is $+1$, a win for the minimizing player (O) is $-1$, and a tie is $0$.
State the minimax value function as a recursive formula.
$$V(s)=\begin{cases} \text{Utility}(s) & \text{if } s \text{ is terminal} \\ \max_{a} V(\text{Result}(s,a)) & \text{if it is MAX's turn} \\ \min_{a} V(\text{Result}(s,a)) & \text{if it is MIN's turn} \end{cases}$$
How does minimax decide which move to make from the current state?
It simulates every possible move, recursively computes the value of each resulting state all the way to terminal states (assuming both players play optimally), and then picks the move whose resulting state has the best guaranteed value for the current player.
Why is plain minimax feasible for tic-tac-toe but not for chess?
Tic-tac-toe has only about $255{,}168$ possible games, so the full game tree can be searched. Chess has roughly $10^{123}$ possible games (the Shannon number), far too many states for any computer to explore exhaustively.
Name two standard optimizations that make minimax practical for large games.
(1) Alpha–beta pruning: skip branches that cannot affect the final decision, without changing the result. (2) Depth-limited minimax: search only a fixed number of moves ahead and apply a heuristic evaluation function to estimate the value of non-terminal states.
In minimax, which player is MAX and which is MIN, and what does each assume about the other?
MAX is the player trying to achieve the highest utility; MIN is the opponent trying to achieve the lowest. Each assumes the other plays optimally, so minimax computes the best move against a perfect adversary.
Define supervised learning.
A machine learning paradigm in which a model is trained on a dataset of labeled input–output pairs, learning a function $f: X \to Y$ that maps inputs to correct outputs so it can predict labels for new, unseen inputs.
What is the difference between classification and regression in supervised learning?
Classification predicts a discrete category (e.g., spam vs. not spam, rain vs. no rain), while regression predicts a continuous numeric value (e.g., a price or temperature).
In supervised learning, what are training data and labels?
Training data are the example inputs (feature values) shown to the model during learning; labels are the known correct outputs attached to each example, which the model uses as the ground truth to learn from.
How does nearest-neighbor classification work?
To classify a new data point, find the single training example closest to it (by a distance measure in feature space) and assign the new point that neighbor's label.
How does $k$-nearest-neighbors ($k$-NN) improve on 1-nearest-neighbor?
Instead of trusting one closest point, $k$-NN looks at the $k$ closest training examples and assigns the label held by the majority of them, making the classifier more robust to noisy points and outliers.
What is overfitting in machine learning?
When a model fits its training data too closely — capturing noise and idiosyncrasies rather than the general pattern — so it performs very well on training data but poorly on new, unseen data.
Give two classic examples of supervised learning tasks with their inputs and outputs.
(1) Spam detection: input = features of an email, output = the category spam or not spam (classification). (2) Weather prediction: input = measurements like humidity and air pressure, output = whether it will rain (classification) or how much (regression).
Define reinforcement learning (RL).
A learning paradigm in which an agent learns from experience by interacting with an environment: it takes actions, receives rewards for good outcomes and penalties for bad ones, and gradually learns a strategy (policy) that maximizes cumulative reward.
Planning Artificial Intelligence for CS50x: Introduction to Computer Science
Artificial Intelligence is about 7% of the CS50x: Introduction to Computer Science syllabus by topic count — 8 of 112 topics, spread over 3 chapters. At roughly 45 minutes per topic plus 12 minutes per sub-topic, a first pass runs to about 6 hours.
The heaviest chapters are Machine Learning (3 topics), Large Language Models (3 topics), Foundations of AI (2 topics) . Front-load those while your energy is high; the short chapters are better revision filler later.
Work top-down: read the chapter, then tick topics off individually rather than marking the whole chapter done. Sub-topics are where silent gaps hide.
Artificial Intelligence (CS50x: Introduction to Computer Science) FAQ
What is in the CS50x: Introduction to Computer Science Artificial Intelligence syllabus?
Artificial Intelligence is split into 3 chapters — Foundations of AI, Machine Learning and Large Language Models, containing 8 topics and 0 sub-topics in total.
How is Artificial Intelligence structured in the CS50x: Introduction to Computer Science syllabus?
3 chapters. Artificial Intelligence accounts for about 7% of the topics in the whole CS50x: Introduction to Computer Science syllabus (8 of 112).
How long should I spend on Artificial Intelligence for CS50x: Introduction to Computer Science?
Budget around 6 hours for a first pass through Artificial Intelligence — about 45 minutes per topic plus 12 minutes per sub-topic across its 8 topics. Add revision cycles on top.
Are there flashcards for CS50x: Introduction to Computer Science Artificial Intelligence?
Yes — a 50-card Artificial Intelligence deck. Sample cards are printed on this page, and the full deck is free in the Examius app with spaced repetition scheduling.