1. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Problem Solving by Searching
Search Methods :
informed (Heuristic) search
2. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
2
Traditional informed search
strategies
Greedy Best first search
“Always chooses the successor node with the best f value”
where f(n) = h(n)
We choose the one that is nearest to the final state among
all possible choices
A* search
Best first search using an “admissible” heuristic function f
that takes into account the current cost g
Always returns the optimal solution path
3. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Informed Search Strategies
Best First Search
Greedy Search
eval-fn: f(n) = h(n)
4. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
4
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
5. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
5
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
6. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
6
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
7. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
7
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
8. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
8
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
9. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
9
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
10. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
10
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
11. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
11
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
12. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
12
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
13. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
13
Greedy Search
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
14. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
14
Greedy Search: Tree Search
A
Start
15. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
15
Greedy Search: Tree Search
A
B
C
E
Start
75118
140 [374][329]
[253]
16. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
16
Greedy Search: Tree Search
A
B
C
E
F
99
G
A
80
Start
75118
140 [374][329]
[253]
[193]
[366]
[178]
17. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
17
Greedy Search: Tree Search
A
B
C
E
F
I
99
211
G
A
80
Start
Goal
75118
140 [374][329]
[253]
[193]
[366]
[178]
E
[0][253]
18. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
18
Greedy Search: Tree Search
A
B
C
E
F
I
99
211
G
A
80
Start
Goal
75118
140 [374][329]
[253]
[193]
[366]
[178]
E
[0][253]
Path cost(A-E-F-I) = 253 + 178 + 0 = 431
dist(A-E-F-I) = 140 + 99 + 211 = 450
19. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
19
Greedy Search: Optimal ?
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
dist(A-E-G-H-I) =140+80+97+101=418
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
140
20. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
20
Greedy Search: Complete ?
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = h (n) = straight-line distance heuristic
State Heuristic: h(n)
A 366
B 374
** C 250
D 244
E 253
F 178
G 193
H 98
I 0
140
21. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
21
Greedy Search: Tree Search
A
Start
22. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
22
Greedy Search: Tree Search
A
B
C
E
Start
75118
140 [374][250]
[253]
23. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
23
Greedy Search: Tree Search
A
B
C
E
D
111
Start
75118
140 [374][250]
[253]
[244]
24. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
24
Greedy Search: Tree Search
A
B
C
E
D
111
Start
75118
140 [374][250]
[253]
[244]
C[250]
Infinite Branch !
25. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
25
Greedy Search: Tree Search
A
B
C
E
D
111
Start
75118
140 [374][250]
[253]
[244]
C
D
[250]
[244]
Infinite Branch !
26. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
26
Greedy Search: Tree Search
A
B
C
E
D
111
Start
75118
140 [374][250]
[253]
[244]
C
D
[250]
[244]
Infinite Branch !
27. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
27
Greedy Search: Time and Space
Complexity ?
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
140
• Greedy search is not optimal.
• Greedy search is incomplete
without systematic checking of
repeated states.
• In the worst case, the Time and
Space Complexity of Greedy
Search are both O(bm)
Where b is the branching factor and m
the maximum path length
28. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Informed Search Strategies
A* Search
eval-fn: f(n)=g(n)+h(n)
29. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
29
Greedy Search minimizes a heuristic h(n) which is an
estimated cost from a node n to the goal state. However,
although greedy search can considerably cut the search
time (efficient), it is neither optimal nor complete.
Uniform Cost Search minimizes the cost g(n) from the
initial state to n. UCS is optimal and complete but not
efficient.
New Strategy: Combine Greedy Search and UCS to get an
efficient algorithm which is complete and optimal.
A* Search
30. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
30
A* uses a heuristic function which
combines g(n) and h(n): f(n) = g(n) + h(n)
g(n) is the exact cost to reach node n from
the initial state. Cost so far up to node n.
h(n) is an estimation of the remaining cost
to reach the goal.
A* Search
31. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
31
A* (A Star)
n
g(n)
h(n)
f(n) = g(n)+h(n)
32. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
32
A* Search
f(n) = g(n) + h (n)
g(n): is the exact cost to reach node n from the initial state.
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 98
I 0
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
140
33. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
33
A* Search: Tree Search
A Start
34. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
34
A* Search: Tree Search
A
BC E
Start
75118
140
[393] [449]
[447]
35. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
35
A* Search: Tree Search
A
BC E
F
99
G
80
Start
75118
140
[393] [449]
[447]
[417][413]
36. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
36
A* Search: Tree Search
A
BC E
F
99
G
80
Start
75118
140
[393] [449]
[447]
[417][413]
H
97
[415]
37. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
37
A* Search: Tree Search
A
BC E
F
I
99
G
H
80
Start
97
101
75118
140
[393] [449]
[447]
[417][413]
[415]
Goal [418]
38. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
38
A* Search: Tree Search
A
BC E
F
I
99
G
H
80
Start
97
101
75118
140
[393] [449]
[447]
[417][413]
[415]
Goal [418]
I [450]
39. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
39
A* Search: Tree Search
A
BC E
F
I
99
G
H
80
Start
97
101
75118
140
[393] [449]
[447]
[417][413]
[415]
Goal [418]
I [450]
40. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
40
A* Search: Tree Search
A
BC E
F
I
99
G
H
80
Start
97
101
75118
140
[393] [449]
[447]
[417][413]
[415]
Goal [418]
I [450]
41. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
A* Search
42. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
A* Search Tree
43. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Admissible and Consistency
44. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Admissible
h(n) =< C(n,g)
Consistency
h(n) =< h(n’) + C(n,n’)
45. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Admissible
46. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Admissible
47. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Consistency
S------B
48. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
A* with h() not Admissible
h() overestimates the cost to reach
the goal state
49. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
49
A* Search: h not admissible !
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
f(n) = g(n) + h (n) – (H-I) Overestimated
g(n): is the exact cost to reach node n from the initial state.
State Heuristic: h(n)
A 366
B 374
C 329
D 244
E 253
F 178
G 193
H 138
I 0
140
50. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
50
A* Search: Tree Search
A Start
51. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
51
A* Search: Tree Search
A
BC E
Start
75118
140
[393] [449]
[447]
52. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
52
A* Search: Tree Search
A
BC E
F
99
G
80
Start
75118
140
[393] [449]
[447]
[417][413]
53. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
53
A* Search: Tree Search
A
BC E
F
99
G
80
Start
75118
140
[393] [449]
[447]
[417][413]
H
97
[455]
54. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
54
A* Search: Tree Search
A
BC E
F
99
G
H
80
Start
97
75118
140
[393] [449]
[447]
[417][413]
[455] Goal I [450]
55. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
55
A* Search: Tree Search
A
BC E
F
99
G
H
80
Start
97
75118
140
[393] [449]
[447]
[417][413]
[455] Goal I [450]
D[473]
56. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
56
A* Search: Tree Search
A
BC E
F
99
G
H
80
Start
97
75118
140
[393] [449]
[447]
[417][413]
[455] Goal I [450]
D[473]
57. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
57
A* Search: Tree Search
A
BC E
F
99
G
H
80
Start
97
75118
140
[393] [449]
[447]
[417][413]
[455] Goal I [450]
D[473]
58. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
58
A* Search: Tree Search
A
BC E
F
99
G
H
80
Start
97
75118
140
[393] [449]
[447]
[417][413]
[455] Goal I [450]
D[473]
A* not optimal !!!
59. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
A* Algorithm
A* with systematic checking for
repeated states …
60. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
60
A* Algorithm
1. Search queue Q is empty.
2. Place the start state s in Q with f value h(s).
3. If Q is empty, return failure.
4. Take node n from Q with lowest f value.
(Keep Q sorted by f values and pick the first element).
5. If n is a goal node, stop and return solution.
6. Generate successors of node n.
7. For each successor n’ of n do:
a) Compute f(n’) = g(n) + cost(n,n’) + h(n’).
b) If n’ is new (never generated before), add n’ to Q.
c) If node n’ is already in Q with a higher f value, replace it with
current f(n’) and place it in sorted order in Q.
End for
8. Go back to step 3.
61. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
61
A* Search: Analysis
A
B
D
C
E
F
I
99
211
G
H
80
Start
Goal
97
101
75118
111
140
•A* is complete except if there is an
infinity of nodes with f < f(G).
•A* is optimal if heuristic h is
admissible.
•Time complexity depends on the
quality of heuristic but is still
exponential.
•For space complexity, A* keeps all
nodes in memory. A* has worst case
O(bd) space complexity, but an
iterative deepening version is possible
(IDA*).
62. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
A* Algorithm
A* with systematic checking for repeated states
An Example: Map Searching
63. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
63
SLD Heuristic: h()
Straight Line Distances to Bucharest
Town SLD
Arad 366
Bucharest 0
Craiova 160
Dobreta 242
Eforie 161
Fagaras 178
Giurgiu 77
Hirsova 151
Iasi 226
Lugoj 244
Town SLD
Mehadai 241
Neamt 234
Oradea 380
Pitesti 98
Rimnicu 193
Sibiu 253
Timisoara 329
Urziceni 80
Vaslui 199
Zerind 374
We can use straight line distances as an admissible heuristic as they will never overestimate
the cost to the goal. This is because there is no shorter distance between two cities than the
straight line distance. Press space to continue with the slideshow.
64. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
64
Arad
Bucharest
Oradea
Zerind
Faragas
Neamt
Iasi
Vaslui
Hirsov
a
Eforie
Urziceni
Giurgui
Pitesti
Sibiu
Dobreta
Craiova
Rimnicu
Mehadi
a
Timisoara
Lugoj
87
92
142
86
98
86
211
101
90
99
151
71
75
140
118
111
70
75
120
138
146
97
80
140
80
97
101
Sibiu
Rimnicu
Pitesti
Distances Between Cities
65. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Greedy Search in Action …
Map Searching
67. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
A* in Action …
Map Searching
69. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
Informed Search Strategies
Iterative Deepening A*
70. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
70
Iterative Deepening A*:IDA*
Use f(N) = g(N) + h(N) with admissible and
consistent h
Each iteration is depth-first with cutoff on
the value of f of expanded nodes
71. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
71
Consistent Heuristic
The admissible heuristic h is consistent (or
satisfies the monotone restriction) if for every
node N and every successor N’ of N:
h(N) c(N,N’) + h(N’)
(triangular inequality)
A consistent heuristic is admissible.
N
N’ h(N)
h(N’)
c(N,N’)
72. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
72
IDA* Algorithm
In the first iteration, we determine a “f-cost limit” – cut-off value
f(n0) = g(n0) + h(n0) = h(n0), where n0 is the start node.
We expand nodes using the depth-first algorithm and backtrack whenever
f(n) for an expanded node n exceeds the cut-off value.
If this search does not succeed, determine the lowest f-value among the
nodes that were visited but not expanded.
Use this f-value as the new limit value – cut-off value and do another
depth-first search.
Repeat this procedure until a goal node is found.
73. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
73
8-Puzzle
4
6
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
Cutoff=4
74. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
74
8-Puzzle
4
4
6
Cutoff=4
6
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
75. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
75
8-Puzzle
4
4
6
Cutoff=4
6
5
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
76. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
76
8-Puzzle
4
3
6
Cutoff=4
6
5
5
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
77. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
77
4
8-Puzzle
4
6
Cutoff=4
6
5
56
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
78. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
78
8-Puzzle
4
6
Cutoff=5
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
79. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
79
8-Puzzle
4
4
6
Cutoff=5
6
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
80. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
80
8-Puzzle
4
4
6
Cutoff=5
6
5
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
81. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
81
8-Puzzle
4
4
6
Cutoff=5
6
5
7
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
82. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
82
8-Puzzle
4
4
6
Cutoff=5
6
5
7
5
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
83. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
83
8-Puzzle
4
4
6
Cutoff=5
6
5
7
5 5
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
84. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
84
8-Puzzle
4
4
6
Cutoff=5
6
5
7
5 5
f(N) = g(N) + h(N)
with h(N) = number of misplaced tiles
85. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
85
When to Use Search Techniques
The search space is small, and
There are no other available techniques, or
It is not worth the effort to develop a more
efficient technique
The search space is large, and
There is no other available techniques, and
There exist “good” heuristics
86. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Nov2016
86
Conclusions
Frustration with uninformed search led to the idea
of using domain specific knowledge in a search so
that one can intelligently explore only the relevant
part of the search space that has a good chance of
containing the goal state. These new techniques
are called informed (heuristic) search strategies.
Even though heuristics improve the performance
of informed search algorithms, they are still time
consuming especially for large size instances.