BSCS Bachelor of Science in Computer Science: Artificial Intelligence Fundamentals 2 โ Questions and Answers
Question 1: Which search algorithm uses a heuristic function h(n) to estimate the cost from node n to the goal and expands the node with the lowest f(n) = g(n) + h(n)?
- Dijkstra's algorithm
- A* search (Correct answer)
- Breadth-first search
- Iterative deepening DFS
Correct answer: A* search
A* search combines the actual path cost g(n) with a heuristic estimate h(n) to find the optimal path efficiently.
Question 2: In a Bayesian network, what does a conditional probability table (CPT) specify?
- The prior probability of the root nodes only
- The probability of a node given all possible combinations of its parents' values (Correct answer)
- The joint probability of all variables in the network
- The marginal probability of each variable independently
Correct answer: The probability of a node given all possible combinations of its parents' values
A CPT for a node lists P(node | parent combinations), capturing all conditional dependencies.
Question 3: What is the primary purpose of the softmax function in a neural network's output layer for multi-class classification?
- Introduce non-linearity in hidden layers
- Normalize outputs into a probability distribution summing to 1 (Correct answer)
- Prevent vanishing gradients
- Reduce overfitting by dropping neurons
Correct answer: Normalize outputs into a probability distribution summing to 1
Softmax exponentiates each output and divides by the sum, converting raw scores into class probabilities.
Question 4: Which phenomenon occurs when a decision tree is trained to perfectly fit training data, including noise, resulting in poor generalization?
- Underfitting
- Overfitting (Correct answer)
- Regularization
- Bagging
Correct answer: Overfitting
Overfitting happens when a model captures noise and random fluctuations in training data rather than the true underlying pattern.
Question 5: In reinforcement learning, what is the Bellman equation used for?
- Computing the entropy of a policy
- Expressing the value of a state recursively in terms of immediate reward and future value (Correct answer)
- Calculating the gradient of the loss function
- Normalizing the reward signal across episodes
Correct answer: Expressing the value of a state recursively in terms of immediate reward and future value
The Bellman equation decomposes V(s) = R + ฮณยทV(s'), forming the foundation for dynamic programming in RL.
Question 6: Which type of AI agent selects actions by comparing expected utility values and choosing the action that maximizes expected utility?
- Reflex agent
- Goal-based agent
- Utility-based agent (Correct answer)
- Learning agent
Correct answer: Utility-based agent
A utility-based agent uses a utility function to measure desirability of states and picks the action maximizing expected utility.
Question 7: What is the key characteristic of a PDDL (Planning Domain Definition Language) planning problem?
- It describes agent behavior using neural weights
- It defines initial state, goal state, and actions with preconditions and effects (Correct answer)
- It specifies reward functions for reinforcement learning
- It encodes probability distributions over state transitions
Correct answer: It defines initial state, goal state, and actions with preconditions and effects
PDDL separates domain (actions, predicates) from problem (initial state, goal), enabling classical planning algorithms.
Which search algorithm uses a heuristic function h(n) to estimate the cost from node n to the goal and expands the node with the lowest f(n) = g(n) + h(n)?