Indian Institute of Technology, Kharagpur Class Test 1, 2019-20
Indian Institute of Technology, Kharagpur Class Test 1, 2019-20
Marks obtained
1. Consider a search problem where all edges have cost 1 and the optimal solution has cost C. Let h be a heuristic
which is max{ h* k, 0 }, where h* is the actual cost to the closest goal and k is a non-negative constant unknown
to the search algorithm. A heuristic is monotone if at each node, n, with successor, m, h(n) ≤ h(m) + c(n,m).
[ 4+4+4 = 12 marks]
(a) Write True/False in the boxes for the following statements:
(b) Which of the following is the most reasonable description of how many more nodes will be expanded in the
worst case with heuristic h compared to h*, as a function of k? [Assume a branching factor of b]
Exponential in k. At k = 0: only the d nodes on an optimal path to the closest goal are expanded for
search depth (= optimal path length) d. At k = max(h); the problem reduces to uninformed search
and BFS expands bd nodes for branching factor b . In general, all nodes within distance k of the
closest goal will have heuristic h = 0 and uninformed search may expand them. Note that search
reduces to BFS since A* with h = 0 is UCS and in this search problem all edges have cost 1 so path
cost = path length.
Page 2 of 4
(c) Now consider the same search problem, but with a heuristic h, which is 0 at all states that lie along an optimal
path to a goal and h* elsewhere. Write True/False for the following statements in the boxes.
In this particular case, the insect must pass through a series of partially flooded
tunnels. Flooded squares are lightly shaded. The insect can hold its breath for k time
steps in a row. Moving into a flooded square requires our insect to expend 1 unit of
air, while moving into a free square refills its air supply.
The state of the insect at any point of time can be defined as x, y, z , where x and y are the coordinates of its present
position in the maze, that is, column number and row number respectively. What do you think is z?
[4 marks]
Answer with brief justification:
The remaining breath of the insect. The insect needs to reach X without reaching any state
where it has zero breath left.
3. Complete the following simulated annealing function for a maximization problem: [ 4 marks ]
∆𝑬⁄
else current next with probability 𝒆 𝑻
Page 3 of 4
4. Consider the game tree in the figure, which contains max nodes (square), min nodes (round), and chance nodes
(oval). At the chance nodes, the probability of each outcome is equally likely. You represent the max nodes and
your opponent represents the min nodes.
(a) Your opponent is rational if she always goes for the move with guaranteed minimum returns. Under the
assumption that your opponent is rational, indicate the values propagated to the root node by its children in the
empty boxes provided besides the edges.
(b) Is pruning possible if nodes are evaluated in left-to-right order? If so, cross out the branches that may be pruned.
[ 3+3= 6 marks ]
20 30
16
20 ?
16 ? 30
18 12 40
50 60
5. You are given a maximization problem with a search space of size 1012. You decide to run Gradient Descent 1000
times, each time with a randomly selected starting point. The lowest value produced by your 1000 runs is 1.3, the
highest value is 4.9, and the average is 3.2. The algorithm on average takes 5 iterations to converge and return a
result.
[ 2+2 = 4 marks]
(a) Will you be justified in reporting 4.9 as the global optimum? Explain your answer!
No, because my runs are very quickly converging to significantly different values, indicating that the
search landscape contains many local optima. Gradient Descent is not an appropriate search algorithm
for this type of search landscape, and therefore it is highly unlikely that I have actually found the
global optimum.
(b) If you were asked to validate your result with further experiments, which local search algorithms would you use
and why?
For this type of search landscape containing many local optima, a search algorithm with the ability to
escape local optima is needed such as stochastic beam search, simulated annealing, or evolutionary
algorithms.
Page 4 of 4
ROUGH WORK