1. Home
  2. Explore
  3. Computer Science
  4. Introduction to AI with Python

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Introduction to AI with Python

  • 49Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Search Problems
In search problems, an
is an entity that perceives its environment and acts upon it.

49 questions

  1. 1
    In 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

  2. 2
    The
    _____
    function takes a state and an action and returns the resulting state.
    Hint

    This function describes the outcome of applying an action.

    Answer

    result

  3. 3
    In 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

  4. 4
    Depth-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

  5. 5
    Breadth-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

  6. 6
    The 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

  7. 7
    A* search uses the evaluation function f(n)=g(n)+h(n)f(n) = g(n) + h(n)f(n)=g(n)+h(n), where g(n)g(n)g(n) is the cost to reach node nnn and h(n)h(n)h(n) is the
    _____
    .
    Hint

    This function estimates the remaining cost to the goal.

    Answer

    heuristic

  8. 8
    In 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

  9. 9
    Alpha-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

  10. 10
    In 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

  11. 11
    In propositional logic, the logical connective
    _____
    is true only when both operands are true.
    Hint

    This symbol looks like an upside-down V: landlandland.

    Answer

    and

  12. 12
    The statement alpha models eta means that in every model where alphaalphaalpha is true, eta is also true; this relationship is called
    _____
    .
    Hint

    It is a logical consequence relation.

    Answer

    entailment

  13. 13
    Model 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

  14. 14
    The 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

  15. 15
    First-order logic extends propositional logic with
    _____
    symbols (representing objects) and predicate symbols (representing relations).
    Hint

    These symbols name specific individuals.

    Answer

    constant

  16. 16
    Bayes' rule states that P(B∣A)=P(A∣B)⋅P(B)P(A)P(B|A) = \frac{P(A|B) \cdot P(B)}{P(A)}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

  17. 17
    Two events A and B are
    _____
    if P(A∩B)=P(A)⋅P(B)P(A \cap B) = P(A) \cdot P(B)P(A∩B)=P(A)⋅P(B).
    Hint

    Knowledge of one event does not affect the probability of the other.

    Answer

    independent

  18. 18
    A 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

  19. 19
    Inference 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

  20. 20
    Rejection 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

  21. 21
    A 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

  22. 22
    Hill 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

  23. 23
    Simulated annealing sometimes accepts worse solutions with a probability that decreases over time according to a
    _____
    schedule.
    Hint

    This parameter controls randomness.

    Answer

    temperature

  24. 24
    Linear 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

  25. 25
    In 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

  26. 26
    Arc 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

  27. 27
    Backtracking 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

  28. 28
    The minimum remaining values heuristic selects the variable with the smallest
    _____
    to assign next.
    Hint

    It chooses the most constrained variable.

    Answer

    domain

  29. 29
    In 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

  30. 30
    The 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

  31. 31
    Support 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

  32. 32
    In 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

  33. 33
    Overfitting 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

  34. 34
    Regularization adds a penalty term to the loss function to discourage overly
    _____
    models.
    Hint

    This favors simpler hypotheses.

    Answer

    complex

  35. 35
    In 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

  36. 36
    A perceptron (single-layer neural network) can only learn linearly
    _____
    decision boundaries.
    Hint

    It separates classes with a hyperplane.

    Answer

    separable

  37. 37
    In 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

  38. 38
    Dropout 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

  39. 39
    Convolutional 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

  40. 40
    Pooling 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

  41. 41
    Recurrent 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

  42. 42
    The 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

  43. 43
    In 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

  44. 44
    An 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

  45. 45
    In 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

  46. 46
    Naive Bayes classifiers assume that features (words) are
    _____
    given the class label, simplifying probability estimation.
    Hint

    This is a strong simplifying assumption.

    Answer

    independent

  47. 47
    Word2vec 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

  48. 48
    In 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

  49. 49
    The 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

1 of 49
Question 1 of 49

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent