You are on page 1of 11

COMP 308:

ARTIFICIAL INTELLIGENCE
By:
Weyori Benjamin Asubam
[BSc. Comp. Sci., M.Phil. Comp. Eng., PhD. Candidate(NUST)]
Office: Office after the Account office
Tel: 0244407521

SEARCHING GAME TREES


Consider an OR tree with two types of OR
nodes, namely Min nodes and Max nodes
In Min nodes, select the min cost successor
In Max nodes select the max cost successor
Terminal nodes are winning or loosing states
It is often infeasible to search up to the
terminal
We must heuristics costs to compare nonterminal nodes

Example

Player A Player B-

L
L
L

-Max
-Min
1
0

1
4

1
0
1
0

1
4

1
0

1
1

1
2

2
0

2
2
1
2

1
4

1
5

1
2

1
4

2
0

2
2

20

21

Shallow and deep pruning


Shallow cut-off

Deep cut-off

10

A
10
14

-Max
-Min

G
5

Alpha Beta Pruning


Alpha- Bound of J
The max current val of all MAX ancestors
of J
Exploration of a min node, J, is stopped
when its value equals or falls below alpha
In min node, we update beta

40
This route
gives a value
at least 40

10

(J)= current Max


value of all Max
ancestors of J

This direction is
not chosen
meaning we prune
off that direction

Beta Bound of J
The min current val of all MIN ancestors of J

Exploration of a max node, J, is stopped when its value


equals or exceeds beta
In max node we update alpha
In both min and max nodes, we return when

1
0

1
0

1
0

1
1

1
4

1
5

Alpha- Beta Procedure: V(J; , )


1. If J is a terminal, return V(J)=h(J)
2.If J is a max node:
for each successor J k of J in succession:
Set =max {, V(J ; , )k}
If then return else continue
Return
3. If J is a min node:
for each successor Jk of J in succession:
Set = min {, V(J ; , )k }
If then return , else continue
Return

You might also like