AI_TEST
AI_TEST
A* Graph Search.........................................................................................................................4
Admissible Heuristics.................................................................................................................5
Consistency of Heuristics...........................................................................................................6
Expectimax Search......................................................................................................................7
Zero-Sum Games........................................................................................................................8
2. Alpha-Beta Pruning.........................................................................................................8
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ụ
A* Graph Search
Duyệt theo f(n) = g(n) + h(n) nhỏ nhất
Example 1:
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
8
9