You are on page 1of 2

Helwan University Fall Semester

Faculty of Computers and Artificial Intelligence Artificial Intelligence – CS361


Academic Year (2020/2021) Undergraduate Studies – Level 3

Problem Solving as Search .. Heuristic Search & Adversarial Search


Sheet # 3
No. Of Questions: 5 No. Of Pages: 2

Question 1: Using open and closed lists, trace step-by-step the following graph using
depth-first, breadth-first, hill climbing and best-first search algorithms:
A-5

B-4 C-4 D-6

E-5 F-5 G-4 H-3 I-5 J-3

K-3 L-4 M-4 N-3 O-2 P-3 Q-4 R-5

P is the goal – Each state includes its


heuristic value.
S-6 T-3

Question 2: Perform minimax on the following tree:


A
Max

B C

D E F G H

3 5 4
I J K L
5 7 8
M N
0 7

Question 3: Explain the following statements:

a) While solving the 8-puzzle, the two heuristics (Tiles out of place, and Sum of distances
out of place) can be criticized for failing to acknowledge the difficulty of tile reversals.
b) In effect, the g(n) component of the evaluation function - "f(n) = h(n) + g(n), where
g(n) measures the actual length of the path from any state n to the start state and h(n)
is a heuristic estimate of the distance from state n to a goal" - gives the search more
of a breadth-first flavor.

1/2
Artificial Intelligence – CS361: Sheet #3 – Heuristic & Adversarial Search – Fall 2020
c) A major problem of hill-climbing strategies is their tendency to become stuck at
local maxima.
d) Two-person games are more complicated than simple puzzles.
e) In applying minimax to more complicated games, it's seldom possible to expand the
state space graph out to the leaf nodes. Instead, the state space is searched to a
predefined number of levels, as determined by available resources of time and
memory. But this strategy has a disadvantage.

Question 4: Using alpha-beta pruning, consider the nodes from right to left, which
nodes are cut off? Circle the nodes that are not examined.
A
Max
L R
M

L R L R L R

2 3 1 2 4 6
Question 5: Given the following first two levels of the tic-tac-toe state space:

X X X
X X X
X X X
• Reduce the second level by Symmetry.
• Construct the third level for the reduced state space & reduce it by symmetry.
• Apply the "most wins" heuristic to the reduced state space.
• Apply a two-ply minimax to the reduced state space with MAX having the first move,
and using the heuristic E(n) = M(n) - O(n), where M(n) is the total of My possible
winning lines, O(n) is total of Opponent's possible winning lines, & E(n) is the total
Evaluation for state n.

X X X has 6 possible win paths: X


Three wins X
through a corner O has 5
O possible win
O
square
The "most wins" heuristic applied. paths: O
E(n) = 6 – 5 = 1.

With our best wishes;


Dr. Hala Abdel-Galil & Dr. Amr S. Ghoneim

2/2
Artificial Intelligence – CS361: Sheet #3 – Heuristic & Adversarial Search – Fall 2020

You might also like