Introduction to AI with Python
- 49Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
49 questions
- 1In search problems, an_____is an entity that perceives its environment and acts upon it.
Hint
Think of the entity that takes actions to achieve a goal.
Answer
agent
- 2The_____function takes a state and an action and returns the resulting state.
Hint
This function describes the outcome of applying an action.
Answer
result
- 3In search algorithms, a_____is a data structure that keeps track of a state, its parent, the action taken, and the path cost.
Hint
This structure packages information about a state in the search tree.
Answer
node
- 4Depth-first search uses a_____data structure for the frontier, processing the most recently added node first.
Hint
This data structure follows a last-in-first-out (LIFO) order.
Answer
stack
- 5Breadth-first search uses a_____data structure for the frontier, exploring the shallowest nodes first.
Hint
This data structure follows a first-in-first-out (FIFO) order.
Answer
queue
- 6The heuristic function in informed search estimates the cost from a state to the goal, often using_____distance in grid-based problems.
Hint
This distance measure sums the absolute differences in coordinates, ignoring obstacles.
Answer
Manhattan
- 7A* search uses the evaluation function f(n)=g(n)+h(n), where g(n) is the cost to reach node n and h(n) is the_____.
Hint
This function estimates the remaining cost to the goal.
Answer
heuristic
- 8In adversarial search, the minimax algorithm assumes the opponent plays optimally and aims to_____the player's utility.
Hint
The opponent's goal is opposite to the player's.
Answer
minimize
- 9Alpha-beta pruning optimizes minimax by pruning branches that cannot affect the final decision, using two values: alpha (best for max) and_____(best for min).
Hint
The second value tracks the best option for the minimizing player.
Answer
beta
- 10In depth-limited minimax, an_____function estimates the utility of a non-terminal state when the search depth limit is reached.
Hint
This function approximates how good a state is without full search.
Answer
evaluation
- 11In propositional logic, the logical connective_____is true only when both operands are true.
Hint
This symbol looks like an upside-down V: land.
Answer
and
- 12The statement alpha models eta means that in every model where alpha is true, eta is also true; this relationship is called_____.
Hint
It is a logical consequence relation.
Answer
entailment
- 13Model checking is an inference algorithm that enumerates all possible_____to determine if the knowledge base entails a query.
Hint
These are assignments of truth values to propositional symbols.
Answer
models
- 14The resolution rule in propositional logic resolves two clauses containing complementary literals to produce a new clause; if the empty clause is derived, it indicates a_____.
Hint
The empty clause represents false.
Answer
contradiction
- 15First-order logic extends propositional logic with_____symbols (representing objects) and predicate symbols (representing relations).
Hint
These symbols name specific individuals.
Answer
constant
- 16Bayes' rule states that P(B∣A)=P(A)P(A∣B)⋅P(B), allowing inference of a conditional probability from its_____.
Hint
It relates the two conditional probabilities.
Answer
reverse
- 17Two events A and B are_____if P(A∩B)=P(A)⋅P(B).
Hint
Knowledge of one event does not affect the probability of the other.
Answer
independent
- 18A Bayesian network is a directed graph where each node represents a random variable, and edges represent_____dependencies.
Hint
The probability of a node depends on its parents.
Answer
conditional
- 19Inference by enumeration in a Bayesian network calculates a conditional probability by summing over all_____variables.
Hint
These are variables not in the query or evidence.
Answer
hidden
- 20Rejection sampling in Bayesian networks generates samples and discards those that do not match the_____variables.
Hint
These are the variables whose values are known.
Answer
evidence
- 21A Markov chain assumes the_____property: the current state depends only on a finite number of previous states.
Hint
This simplifies the transition model.
Answer
Markov
- 22Hill climbing is a local search algorithm that always moves to a neighbor with a_____value (assuming maximization).
Hint
It tries to improve the current state.
Answer
higher
- 23Simulated annealing sometimes accepts worse solutions with a probability that decreases over time according to a_____schedule.
Hint
This parameter controls randomness.
Answer
temperature
- 24Linear programming aims to minimize a linear cost function subject to linear constraints, often solved by the_____algorithm.
Hint
This classic algorithm moves along edges of the feasible region.
Answer
simplex
- 25In constraint satisfaction, node consistency ensures that all values in a variable's domain satisfy its_____constraints.
Hint
These constraints involve only one variable.
Answer
unary
- 26Arc consistency (AC-3) ensures that for every binary constraint, every value in one variable's domain has a consistent value in the other variable's domain, achieved by revising arcs and adding_____arcs if domains are reduced.
Hint
Changes in one domain may affect other variables.
Answer
neighbor
- 27Backtracking search for CSPs selects an unassigned variable and tries values; if no value works, it_____to a previous variable.
Hint
This undoes the last assignment.
Answer
backtracks
- 28The minimum remaining values heuristic selects the variable with the smallest_____to assign next.
Hint
It chooses the most constrained variable.
Answer
domain
- 29In supervised learning, the function that maps inputs to outputs is learned from a training set of_____pairs.
Hint
Each training example has both features and a label.
Answer
input-output
- 30The k-nearest neighbors algorithm classifies a new input by taking the most common class among its_____nearest data points.
Hint
The parameter k determines how many neighbors are considered.
Answer
k
- 31Support vector machines find a hyperplane that maximizes the_____between the two classes, known as the maximum margin separator.
Hint
This is the distance from the hyperplane to the nearest support vectors.
Answer
margin
- 32In regression tasks, L2 loss (squared error) penalizes outliers more heavily than L1 loss, which uses_____.
Hint
L1 loss takes the absolute difference.
Answer
absolute value
- 33Overfitting occurs when a model fits the training data too closely and fails to_____to new data.
Hint
The model performs well on training but poorly on test data.
Answer
generalize
- 34Regularization adds a penalty term to the loss function to discourage overly_____models.
Hint
This favors simpler hypotheses.
Answer
complex
- 35In holdout cross-validation, data is split into a training set and a_____set to evaluate model performance.
Hint
This set is not used during training.
Answer
testing
- 36A perceptron (single-layer neural network) can only learn linearly_____decision boundaries.
Hint
It separates classes with a hyperplane.
Answer
separable
- 37In multilayer neural networks, the_____algorithm calculates error gradients for hidden layers by propagating errors backward from the output.
Hint
This uses the chain rule of calculus.
Answer
backpropagation
- 38Dropout is a regularization technique that randomly_____a fraction of neurons during training to prevent over-reliance on specific units.
Hint
Neurons are temporarily removed.
Answer
drops
- 39Convolutional neural networks use_____layers to apply filters that detect features like edges in images.
Hint
These layers perform a dot product between a kernel and image patches.
Answer
convolution
- 40Pooling layers in CNNs reduce the spatial dimensions of feature maps, often using_____pooling which takes the maximum value in each region.
Hint
This selects the strongest activation.
Answer
max
- 41Recurrent neural networks (RNNs) maintain a_____that is passed from one step to the next, allowing processing of sequences.
Hint
This captures information about previous inputs.
Answer
hidden state
- 42The transformer architecture uses_____to allow each word to attend to all other words in the input, enabling parallel processing.
Hint
This mechanism computes attention scores between all pairs of positions.
Answer
self-attention
- 43In natural language processing, a context-free grammar consists of rewriting rules that replace_____symbols with sequences of terminals and non-terminals.
Hint
These symbols can be expanded further.
Answer
non-terminal
- 44An n-gram is a contiguous sequence of_____items from a text, such as words or characters.
Hint
The n specifies the length of the sequence.
Answer
n
- 45In the bag-of-words model, text is represented as an unordered collection of words, ignoring_____and grammar.
Hint
The sequence of words is discarded.
Answer
order
- 46Naive Bayes classifiers assume that features (words) are_____given the class label, simplifying probability estimation.
Hint
This is a strong simplifying assumption.
Answer
independent
- 47Word2vec learns distributed word representations by predicting a word from its context or vice versa, so that words with similar meanings have similar_____.
Hint
These numerical representations capture semantic similarity.
Answer
vectors
- 48In the encoder-decoder architecture for sequence-to-sequence tasks, the_____network encodes the input sequence into a context vector.
Hint
This part processes the input.
Answer
encoder
- 49The attention mechanism in transformers computes a weighted sum of input representations, with weights called_____scores that indicate relevance to the current output.
Hint
These scores determine how much each input should influence the output.
Answer
attention

Ask anything
We've read this whole study set, so questions about it get the best answers.