Fakulti Teknologi Maklumat & Komunikasi
Universiti Teknikal Malaysia Melaka (UTeM)
BITI 1113
Artificial Intelligence
Laboratory 6:
Instruction: Answer all questions individually and submit a hardcopy at the end of the lab
session.
1. What is the difference between minimax and alpha-beta pruning?
Mini max is applying the whole tree and exponential without cutting into half. The Alpha -
beta pruning is applying the cutting into half, and it will make sure the has the correct
minimax decision.
2. Assume the given node in Figure 1 as the root node at MAX node, draw the game tree until
the game ends. Show the evaluation function for each node. For each leaf node, identify the
utility function (+1 for Max’s win, -1, for Max’s lose and 0 for draw). The evaluation
function is f(n) = m(n) – o(n) where
m(n) = number of available rows, columns, diagonals for MAX
o(n) = number of available rows, columns, diagonals for MIN
Figure 1: An initial state for Tic-Tac-Toe
1
Computer turn: Max
2-1 =1 2-0 = 2 2-1 =1
Computer turn: Min
-1 0-1 = -1
0-0 =0 1-0 =0
1-1 =0 Computer turn:
Max
-1
0-0=0
1
0-0=0
1
2
3. Based on the game tree in Figure 2, find the best move for the MAX player using Alpha-beta
pruning. Show the value of α and β for each node MAX and MIN.
Figure 2: Game tree
Alpha-beta pruning rule
Max = α = -∞ If (α ≥β) The branch must be cut
β=+
Min = β = -∞
α = +∞
3
4