0% found this document useful (0 votes)
12 views

AI_TEST

Uploaded by

truong khoa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

AI_TEST

Uploaded by

truong khoa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Contents

Depth First Search.......................................................................................................................1

Breadth First Search....................................................................................................................2

Uniform Cost Search...................................................................................................................3

Greedy Graph Search..................................................................................................................4

A* Graph Search.........................................................................................................................4

Admissible Heuristics.................................................................................................................5

Consistency of Heuristics...........................................................................................................6

Expectimax Search......................................................................................................................7

Zero-Sum Games........................................................................................................................8

1. Minimax for Zero-Sum Games........................................................................................8

2. Alpha-Beta Pruning.........................................................................................................8

Other Game Types......................................................................................................................8


AI_Test

Depth First Search

Example:

1
Breadth First Search

Example:

2
Uniform Cost Search

Example 1:

3
Greedy Graph Search
Duyệt theo h(n) nhỏ nhất.
Ví dụ

Greedy graph search path is:


SACG

A* Graph Search
Duyệt theo f(n) = g(n) + h(n) nhỏ nhất

Example 1:

A* graph search expand is S  A  B  C  G


A* graph search path is S  B  C  G
4
Example 2:

Admissible Heuristics
• A heuristic h is admissible(optimistic)if :
0 ≤ h ( n ) ≤h∗(n)
Where h∗(n)is the true cost ¿ a nearest goal
Example 1:
note: h*(n) = cost(A to B)

S  G: h(S) = 7 ≤ cost(S  G) = 1 + 3 + 4 = 7  A
A  G: h(A) = 5 ≤ cost(A  G) = 2 + 4 = 6  A
B  G: h(B) = 7 ≤ cost(B  G) = 3 + 4 = 7  A
C  G: h(C) = 4 ≤ cost(C G) = 4  A
D  G: h(D) = 1 ≤ cost(D  G) = 1  Admissible

5
Example 2:

Consistency of Heuristics
o Consistency :heuristic “arc ” cost ≤ actual cost for each arc
h( A) – h(C)≤ cost (A ¿C)

Example 1:
h(S) – h(A) = 7 – 5 = 2 ≤ cost(S  A) = 3  Consistent
h(S) – h(B) = 7 – 7 = 0 ≤ cost(S  B) = 1  C
h(A) – h(C) = 5 – 4 = 1 ≤ cost(A  C) = 2  C
h(B) – h(C) = 7 – 4 = 3 ≤ cost(B  C) = 3  C
h(C) – h(D) = 4 – 1 = 3 ≤ cost(C  D) = 4  C
h(C) – h(G) = 4 – 0 = 4 ≤ cost(C  G) = 4  C
h(D) – h(G) = 1 – 0 = 1 ≤ cost(D  G) = 1  C

6
Example 2:

Expectimax Search

7
Zero-Sum Games
1. Minimax for Zero-Sum Games

2. Alpha-Beta Pruning

Other Game Types

8
9

You might also like