(Artificial Intelligence and Machine Learning)
Continuous Internal Evaluation Test II - ODD Semester 2025 - 26
Course Title: Advanced AI and ML Course Code: AM722I1A
Date: 25/10/2025 Time: 9.30 AM – 10.45 AM Semester: VII
Solution
Module 2
Q. No. Questions Marks
a. Write an algorithm for probabilistic inference using the Full Joint Probability Distribution with the
variables Toothache, Cavity, and Catch. Demonstrate, with clear reasoning steps, how the marginal
probability can be obtained from the joint distribution.
6
1
b. How does rule-based reasoning help an agent make safe moves in the Wumpus World Revisited?
Give one example rule involving a breeze and a pit. 4
The agent uses if-then rules derived from percepts.
, Example rule:
IF Breeze at (x, y) THEN Pit in one of the adjacent squares
IF no Breeze at (x, y) THEN all adjacent squares are safe
Helps agent mark possible pit squares and choose safe moves (like forward or turn).
OR
In the Wumpus World the agent perceives a breeze in square (1, 2). Assume the start square (1, 1)
is safe and every non-start square independently has a pit with prior probability 0.2.
(a) Using Bayes’ theorem and showing all steps, compute the posterior probability that there is a pit
in (2, 2).
(b) Compute the posterior probability that there is a pit in (1, 3).
(c) Briefly interpret your results.
a. 6
2(b)
Similarly for (1,3): less likely to cause the breeze → posterior smaller.
2 2(c)
Interpretation:
Pit likelihood increases for squares adjacent to breeze, decreases for distant ones — Bayesian
reasoning updates beliefs with percepts.
Explain Hyperparameter Tuning in machine learning model.
Hyperparameter tuning is the process of finding the best set of control parameters (like learning
rate, number of layers, k-value, etc.) that govern how a model learns — not learned from data
directly.
We use hyperparameter tuning to optimize model performance (accuracy, precision, recall, etc.) and
prevent overfitting/underfitting.
Common Hyperparameters:
Learning rate (in gradient-based models)
Number of trees / depth (in Random Forest, XGBoost)
b. Regularization strength (λ in Ridge/Lasso) 4
Number of neighbors (in KNN)
Hyperparameter Tuning Methods:
Grid Search: Try all combinations of parameter values.
Random Search: Randomly sample parameter combinations.
Bayesian Optimization / Hyperopt / Optuna: Smart search based on previous results.
Cross-Validation: Used to evaluate each parameter set reliably.
Example:
For a Decision Tree, tuning max_depth and min_samples_split using grid search improves test
accuracy.
Module 3