0% found this document useful (0 votes)
110 views7 pages

AI - AI417DE01 Lab - MidTerm Exam Review 23.2A

The document contains a review for a midterm exam covering topics like search problems, heuristics, game trees, and demolition Pacman. It includes multiple choice and short answer questions about graph search algorithms, heuristic admissibility and consistency, alpha-beta pruning in games, and representing a path finding problem as a search problem.

Uploaded by

thinh.bp00245
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views7 pages

AI - AI417DE01 Lab - MidTerm Exam Review 23.2A

The document contains a review for a midterm exam covering topics like search problems, heuristics, game trees, and demolition Pacman. It includes multiple choice and short answer questions about graph search algorithms, heuristic admissibility and consistency, alpha-beta pruning in games, and representing a path finding problem as a search problem.

Uploaded by

thinh.bp00245
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Artificial Intelligence_AI417DE01 – Mid Term Exam Review

Individual BONUS Work


Name:
Student ID:
Deadline: 11:59pm 20/05/2024 – by submitting into dropbox on E-Learning system
File name format: AI_AI417DE01 Lab – Mid Term Exam Review – StudentID.docx (or .pdf or .zip)

Questions:
A. Search:

Answer the following questions about the search problem shown above. Assume that ties are broken
alphabetically. (For example, a partial plan S " X " A would be expanded before S " X " B; similarly, S " A
" Z would be expanded before S " B " A.) For the questions that ask for a path, please give your answers
in the form “S – A – D – G.”
1. What path would breadth-first graph search return for this search problem?
2. What path would uniform cost graph search return for this search problem?
3. What path would depth-first graph search return for this search problem?
4. What path would A* graph search, using a consistent heuristic, return for this search problem?
5. Consider the heuristics for this problem shown in the table below.

a. Is h1 admissible? (i) Yes (ii) No


b. Is h1 consistent? (i) Yes (ii) No
c. Is h2 admissible? (i) Yes (ii) No
d. Is h2 consistent? (i) Yes (ii) No
B. Search:
For the following questions, consider the search problem shown on the left. It has only three states,
and three directed edges. A is the start node and G is the goal node. To the right, four different
heuristic functions are defined, numbered I through IV.

h(A) h(B) h(G)

hI 4 1 0

hII 5 4 0

hIII 4 3 0

hIV 5 2 0
1. Admissibility and Consistency
For each heuristic function, circle whether it is admissible and whether it is consistent with respect
to the search problem given above.
a. Is hI admissible? (i) Yes (ii) No
b. Is hI consistent? (i) Yes (ii) No
c. Is hII admissible? (i) Yes (ii) No
d. Is hII consistent? (i) Yes (ii) No
e. Is hIII admissible? (i) Yes (ii) No
f. Is hIII consistent? (i) Yes (ii) No
g. Is hIV admissible? (i) Yes (ii) No
h. Is hIV consistent? (i) Yes (ii) No
2. Function Domination
Recall that domination has a speci c meaning when talking about heuristic functions.
Circle all true statements among the following.
a. Heuristic function III dominates IV.
(i) True (ii) False
b. Heuristic function IV dominates III.
(i) True (ii) False
c. Heuristic functions III and IV have no dominance relationship.
(i) True (ii) False
d. Heuristic function I dominates IV.
(i) True (ii) False
e. Heuristic function IV dominates I.
(i) True (ii) False
f. Heuristic functions I and IV have no dominance relationship.
(i) True (ii) False
C. Game:
Alice is playing a ball game with Bob. There are 3 boxes in front of them, each containing 3 balls, and
each ball has a score. Alice first selects a box from the 3 boxes, and then Bob takes a ball from the box
selected by Alice. In Figure 1, nodes B1, B2 or B3 are boxes, and nodes labeled C through K represent
individual balls and their scores. Unless otherwise specified, Alice’s objective is to maximize the score
of the ball that is eventually chosen, and Bob’s objective is to minimize Alice’s score. Assume both
players always act optimally for their goals.

1. In the blanks below, fill in the labels (not the numerical values) of the balls selected for nodes A, B1,
B2 and B3. For example, if Alice’s optimal move is to select the box B1, and Bob selects the ball C,
then A=C, B1=C.
A=? B1 = ? B2 = ? B3 = ?
2. Let’s apply alpha-beta pruning for the tree. Please choose all the child nodes of the branches that
could be pruned in the search tree.
(a) B1 (b) B2 (c) B3 (d) C (e) D (f) E
(g) F (h) G (i) H (j) I (k) J (l) K
3. Assume that you can re-allocate all the balls to different boxes as long as in the end, each box has
exactly 3 balls in it. Could you find a way to re-allocate the balls so that when we apply alpha-beta
pruning, the right branch of B2 as well as the middle and the right branch of B3 will be pruned?
Please list all balls in the order of their new positions in your solution. For example, if your solution
is not to move any ball, then your answer is “C,D,E,F,G,H,I,J,K”. When multiple solutions exist, break
ties alphabetically. For example, if there are two solutions starting with “C,D, ...” and “D,C, ...”, then
your answer should be “C,D, ...”. If there is no solution, please write down “None”.
D. Zero-sum game tree:
1. Consider the following zero-sum game tree. Triangles that point up represent choices for the
maximizing player; triangles that point down represent choices for the minimizing player. Assuming
both players act optimally, fill in the minimax value of each node:

2. Using alpha beta pruning, which leaf nodes or branches can we prune? Assume that branches are
visited in left to right order.

3. If the branches of every minimizer node are reordered such that we prune the maximum number
of leaf node, which leaf nodes can be pruned? Assume that children of maximizer nodes are visited
from left to right and that we are not pruning on equality. Remember to label the order of visit for
every branch of all minimizer nodes.
4. Assume that we are not pruning on equality. In this part, we have a fixed traversal order from left
to right. We start with the tree in the previous part, and shuffle the values of all the leaf nodes
such that we check as few nodes as possible without changing the structure of the tree. The initial
ordering (as in the tree presented in the previous part) is 6 10, 8, 7, 5, 4, 5, 6, 3,7, 2, and the new
ordering is A. B,C,D,E,F,G,H,I,J,K. (Note: this question is challenging!)

a. For all possible new orderings, which of the results (root values) are possible?
b. Suppose that for new ordering, the value of root is 4. Which of the following leaf nodes are
guaranteed to have value ⩽ 5
(a) A (b) B (c) C (d) D (e) E (f) F (g) G
(h) H (i) I (j) J (k) K (l) None of the above
c. Suppose that for new ordering, the value of root is 5. Which of the following leaf nodes are
guaranteed to have value > 5
(a) A (b) B (c) C (d) D (e) E (f) F (g) G
(h) H (i) I (j) J (k) K (l) None of the above
E. Demolition Pacman
Pacman just bought a new square (S) in an M by N grid world that contains some rough terrain. He wants
to clear a path from his new home to the closest grocery store, which is another square (G) on the grid
world. However, there are R squares on the grid that are impassable because there are rocks in the way.
Fortunately, Pacman is carrying D – 1 sticks of dynamite with him. On any turn, Pacman can throw a stick
of dynamite at one of eight neighboring squares (diagonal throws are allowed) if it contains rocks,
consuming a stick and removing the rocks in that location. If he chooses not to throw dynamite, Pacman
can also drive his truck onto one of eight neighboring squares (diagonal moves are allowed) if there is
nothing blocking him. However, his truck only has F — 1 units of fuel and whenever Pacman moves to a
square, one unit of fuel is consumed. Once Pacman runs out of fuel and dynamite, he has no more actions
available. Assume R, D, and F are all greater than 3 and 2 * D < R.
1. Complete the expression below so that X evaluates to the size of the minimal state space. You can
use integers as well as any of the variables mentioned in the problem.

a b c d f u
X =M ∗N ∗R ∗D ∗F ∗2

a=? b=? c=?


d=? f=? u=?
2. What is the maximum possible branching factor?
Maximum branching factor = ?
3. For each subpart below, select all algorithms that can be used to find the specified sequence of
actions. The algorithm should be able to find such a sequence on any grid world that contains that
sequence without failure. Assume you are allowed to define costs between states however you
want.
a. Any sequence of actiom that results in Pacman reaching the Grocery store.
(i) DFS Tree Search (ii) DFS Graph Search (iii) BFS (iv) UCS (v) None of these
b. The sequence of actions that results in Pacman reaching the Grocery store while using the least
amount of dynamite possible.
(i) DFS Tree Search (ii) DFS Graph Search (iii) BFS (iv) UCS (v) None of these
c. The sequence of actions that results in Pacman reaching the Grocery store while using the most
amount of dynamite possible.
(i) DFS Tree Search (ii) DFS Graph Search (iii) BFS (iv) UCS (v) None of these
d. The sequence of actions that results in Pacman reaching the Grocery store while having the
lowest sum of fuel consumed plus dynamite consumed.
(i) DFS Tree Search (ii) DFS Graph Search (iii) BFS (iv) UCS (v) None of these
4. Each subpart below describes a change to the above problem. All subparts are independent of each
other, so over each question as if it was the only change to the above description. Note, X is equal
to the size of the state space from the original problem. You are essentially finding a scaling factor
that should be multiplied by the original state space size.
a. Pacman upgraded his truck so that he can now throw dynamite towards the north for free. It
still costs him dynamite to throw in any of the other seven directions.
Complete the expression below so that it evaluates to the size of the new minimal state space.
You can use integers as well as any of the variables mentioned in the problem.

a b c d e
X∗R ∗D ∗F ∗2 ∗3

a=? b=? c=?


d=? e=?
Select all that could possibly be true when comparing to the original problem statement.
(i) The new ruleset will cause BFS to expand less nodes
(ii) The new ruleset will cause BFS to expand the same amount of nodes
(iii) The new ruleset will cause BFS to expand more nodes
b. Y of the R rocks are larger than others (1 < Y < R). They require two sticks of dynamite to be
removed (Pacman can still only throw one stick of dynamite per tum).
Complete the expression below so that it evaluates to the size of the new minimal state space.
You can use integers as well as any of the variables mentioned in the problem.

a b c d e f
X∗R ∗D ∗F ∗2 ∗3 ∗Y

a=? b=? c=?


d=? e=? f=?
Select all that could possibly be true when comparing to the original problem statement.
(i) The new ruleset will cause BFS to expand less nodes
(ii) The new ruleset will cause BFS a expand the same amount of nodes
(iii) The new ruleset will cause BFS to expand more nodes
c. Y of the R rocks are now too large for Pacman to destroy (I <Y < R). Dynamite does nothing on
them so Penman will have to move around them.
Complete the expression below so that it evaluates to the size of the new minimal state space.
You can use integers as well as any of the variables mentioned in the problem.

a b c d e f
X∗R ∗D ∗F ∗2 ∗3 ∗Y

a=? b=? c=?


d=? e=? f=?
Select all that could possibly be true when comparing to the original problem statement.
(iv) The new ruleset will cause BFS to expand less nodes
(v) The new ruleset will cause BFS a expand the same amount of nodes
(vi) The new ruleset will cause BFS to expand more nodes

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy