Difficulty: Easy & Basic
Breadth-first search uses which structure for first-in, first-out behavior?
A LIFO stack
B Binary heap
C FIFO queue
D Hash table
Answer: C. FIFO queue. A FIFO queue visits frontier nodes in the order they were added.
Depth-first exploration commonly relies on which structure?
A Hash map
B Stack
C Matrix
D Queue
Answer: B. Stack. A stack supports depth-first exploration by returning to the most recently added node.
A* ranks nodes using which score?
A f = h only
B f = g Γ h
C f = g + h
D f = g β h
Answer: C. f = g + h. A* adds path cost so far, g, to estimated remaining cost, h.
Cumulative path cost determines uniform-cost search priorityβwhat is selected?
A Accumulated path cost
B Estimated goal distance
C Number of features
D Depth of tree
Answer: A. Accumulated path cost. Uniform-cost search expands the frontier path with the lowest accumulated cost.
For optimal A* tree search, what must an admissible heuristic avoid?
A Never overestimate cost
B Prefer deeper nodes
C Always equal true cost
D Ignore path costs
Answer: A. Never overestimate cost. An admissible heuristic does not overestimate the actual remaining cost.
What does a search state represent?
A A model parameter
B A training label
C An evaluation metric
D A possible configuration
Answer: D. A possible configuration. States encode possible configurations of the search problem.
Goal testing checks what about a state?
A Whether loss is zero
B Whether the goal is reached
C Whether a model is trained
D Whether data is labeled
Answer: B. Whether the goal is reached. A goal test checks whether a state satisfies the target condition.
Percepts arrive through sensors; actions leave through what?
A Labels and features
B Sensors and actuators
C Queues and stacks
D Loss and gradient
Answer: B. Sensors and actuators. Sensors receive percepts, while actuators carry out actions.
PEAS uses S to stand for which component?
A Sensors
B Supervision
C Search
D States
Answer: A. Sensors. PEAS describes Performance measure, Environment, Actuators, and Sensors.
How does a loss function summarize prediction error?
A Search depth
B Prediction error
C Reward frequency
D Training examples
Answer: B. Prediction error. A loss function measures how far predictions are from desired outputs.
Gradient descent updates parameters in which direction?
A Toward larger loss
B Along the gradient
C At random only
D Opposite the gradient
Answer: D. Opposite the gradient. Gradient descent follows the negative gradient to reduce the objective locally.
During training, one epoch generally means what?
A One test example
B One prediction
C One hidden layer
D One pass through training data
Answer: D. One pass through training data. An epoch is one full pass through the training examples.
Hyperparameters are best described as what?
A Learned model weights
B Externally chosen settings
C Predicted classes
D Target labels
Answer: B. Externally chosen settings. Hyperparameters configure training and are not ordinary fitted model parameters.
During k-fold validation, each fold is used how?
A Training twice
B Feature selection only
C Validation once
D Testing continuously
Answer: C. Validation once. Each fold takes a turn as validation data while the others train.
K-nearest neighbors bases prediction on which examples?
A A single centroid
B Rule weights only
C Random hidden states
D Nearby labeled examples
Answer: D. Nearby labeled examples. KNN bases a prediction on the closest training examples.
To run k-means, which setting must be chosen?
A Number of clusters
B Number of labels
C Loss threshold
D Tree depth
Answer: A. Number of clusters. Standard k-means requires a chosen number of clusters, k.
Decision-tree leaves usually contain what?
A A gradient
B A feature test
C A search queue
D A prediction
Answer: D. A prediction. Leaves hold the tree’s output prediction for an input.
Predicted versus actual classes are summarized by which matrix?
A Rewards and actions
B Predicted and actual classes
C Features and gradients
D Training and test sizes
Answer: B. Predicted and actual classes. A confusion matrix summarizes predicted classes against actual classes.
Precision divides true positives by what?
A Predicted positives
B All negatives
C All examples
D Actual positives
Answer: A. Predicted positives. Precision is true positives divided by all predicted positives.
Recall divides true positives by what?
A All predictions
B Predicted positives
C Actual positives
D True negatives
Answer: C. Actual positives. Recall is true positives divided by all actual positives.
Accuracy measures which fraction?
A Missing features
B Training errors
C Positive predictions
D Correct predictions
Answer: D. Correct predictions. Accuracy is the fraction of predictions that are correct.
F1 combines which two metrics harmonically?
A Precision and recall
B Bias and variance
C Accuracy and loss
D Recall and specificity
Answer: A. Precision and recall. F1 combines precision and recall using their harmonic mean.
How does a recommender system support users?
A Sorts source code
B Finds shortest paths
C Suggests personalized items
D Labels every pixel
Answer: C. Suggests personalized items. Recommender systems rank or suggest items for users.
Outlier detection is another name for what task?
A Nearest centroids
B Balanced classes
C Unusual observations
D Common labels
Answer: C. Unusual observations. Anomaly detection identifies observations that differ from expected patterns.
Speech recognition converts spoken audio into what?
A Class weights
B Written text
C Search paths
D Pixel labels
Answer: B. Written text. Speech recognition maps audio speech to a textual transcription.