Post on 31-Dec-2015
description
April 19, 2023 Artificial Intelligence, Lecturer #14
1
Artificial IntelligenceArtificial IntelligenceLectureLecture
Md. Morshedul Islam Assistant Professor
Department of Computer Science & EngineeringBangladesh University of Business and Technology (BUBT)
April 19, 2023 Artificial Intelligence, Lecturer #14
2
ContentsContents
Informed Search Strategies Heuristic Information Hill Climbing Methods Best-First Search Optimal Search and A* Branch-and-Bound Search Iterative Deepening A* Memory-bounded Heuristic Search
April 19, 2023 Artificial Intelligence, Lecturer #14
3
Hill Climbing Methods:Hill Climbing Methods:An ExampleAn Example
21
9
1916
S
28 241821
11 22 20
23
27
25
2525
16 1923
25 25 25
April 19, 2023 Artificial Intelligence, Lecturer #14
4
Best-First Search: An Best-First Search: An ExampleExample
g
181615
S
12
282220
10 8 2
12
8
18
12
25 2220
15 10 55 10
L1: S20, S22, S28L2: S35, S36, S38L3: S40, S45
April 19, 2023 Artificial Intelligence, Lecturer #14
5
Optimal Search and AOptimal Search and A**
The A* algorithm is a specialization of best-first-search It provides general guidelines with which to estimate goal
distances for general search graphs. At each node along a path to the goal, the A* algorithm
generates all successors nodes and computes the distance (cost) from the start node to a goal node through each of the successor.
It then chooses the successor with the shortest distance for expansion.
The successor for this node are then generated. Node are labeled with f(n) = g(n)+h(n)
April 19, 2023 Artificial Intelligence, Lecturer #14
6
Optimal Search and AOptimal Search and A**: : ExampleExampleRoad Map of a CityRoad Map of a CityO
Z
A
I
T
M
D
L
FS
B
P
C
N
R
G
V
E
HU
71
75
118
111
70
75120
151
14099
80
146
21197
138
101
90
85
87
92
142
98
86
April 19, 2023 Artificial Intelligence, Lecturer #14
7
Optimal Search and AOptimal Search and A**: : ExampleExample
Values of hSLD-straight-line distance to B
A 366 H 151 R 193
B 0 I 226 S 253
C 160 L 244 T 329
D 242 M 241 U 80
E 161 N 234 V 199
F 176 O 380 Z 374
G 77 P 100
April 19, 2023 Artificial Intelligence, Lecturer #14
8
Optimal Search and AOptimal Search and A**: : ExampleExample Node are labeled with Node are labeled with f(n) = g(n)+h(n)f(n) = g(n)+h(n)
(a) Initial State: A
366+0
(b) Expanding A: A
393=140+253
S T Z
447=118+329 449=75+374
April 19, 2023 Artificial Intelligence, Lecturer #14
9
Optimal Search and AOptimal Search and A**: : ExampleExample Node are labeled with Node are labeled with f(n) = g(n)+h(n)f(n) = g(n)+h(n)
(c) Expanding S: A
646=280+366,
S T Z447=118+329 449=75+374
RFA O415=239+176,
671=291+380 413=220+193
140
99140
151 80
April 19, 2023 Artificial Intelligence, Lecturer #14
10
Optimal Search and AOptimal Search and A**: : ExampleExample Node are labeled with Node are labeled with f(n) = g(n)+h(n)f(n) = g(n)+h(n)
(d) Expanding R: A
646=280+366,
S T Z447=118+329 449=75+374
RFA O415=239+176,
671=291+380
417=317+100
140
99140
151 80
SPC146
9780
526=366+160 553=300+253
April 19, 2023 Artificial Intelligence, Lecturer #14
11
Optimal Search and AOptimal Search and A**: : ExampleExample Node are labeled with Node are labeled with f(n) = g(n)+h(n)f(n) = g(n)+h(n)
(e) Expanding F: A
646=280+366,
S T Z447=118+329 449=75+374
RFA O
591=338+253
671=291+380
417=317+100
140
99140
151 80
SPC146
9780
526=366+160553=300+253
BS
21199
450=450+0
April 19, 2023 Artificial Intelligence, Lecturer #14
12
Optimal Search and AOptimal Search and A**: : ExampleExample
526=366+160
(f) Expanding P: A
646=280+366,
S T Z447=118+329 449=75+374
RFA O
591=338+253
671=291+380
140
99140
151 80
SPC146
9780
553=300+253BS
21199
450=450+0
138
B C R418=418+0
10197
615=455+160 607=414+193
April 19, 2023 Artificial Intelligence, Lecturer #14
13
Greedy Best-first SearchGreedy Best-first Search: : ExampleExample
Node are labeled with Node are labeled with f(n) =h(n)f(n) =h(n)
A
S T Z
RFA O
253
329
366
176
253
380 193
374
BS
0
366
April 19, 2023 Artificial Intelligence, Lecturer #14
14
Branch-and-Bound SearchBranch-and-Bound Search
This strategy saves all paths lengths (or costs) from a node to all generated nodes and chooses the shortest path for farther expansion.
It then compares the new path length with all old ones and again chose the shortest path for expansion.
In this method, a lowest cost path will be found. Expensive in case of computing and remembering
all computing paths
15
Branch-and-Bound Search: Branch-and-Bound Search: ExampleExample
L1: S12, S14, S15
L2: S12+11, S12+14, S12+12; S14+11, S14+9; S15+13, S15+8, S15+11L3: S23+12, S23+13, S26+13, S26+9, S24+9, S24+10; S25+10, S25+9, S23+9; S28+9, S28+15, S23+1, S26+1, S26+5
121411
S
9
151412
13 9 10
11
10
9
9
8 1113
15 1 512 1
G
April 19, 2023 Artificial Intelligence, Lecturer #14
16
Recommended TextbooksRecommended Textbooks
[Negnevitsky, 2001] M. Negnevitsky “ Artificial Intelligence: A guide to Intelligent Systems”, Pearson Education Limited, England, 2002.
[Russel, 2003] S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Prentice Hall, 2003, Second Edition
[Patterson, 1990] D. W. Patterson, “Introduction to Artificial Intelligence and Expert Systems”, Prentice-Hall Inc., Englewood Cliffs, N.J, USA, 1990.
[Minsky, 1974] M. Minsky “A Framework for Representing Knowledge”, MIT-AI Laboratory Memo 306, 1974.
April 19, 2023 Artificial Intelligence, Lecturer #14
17
End of PresentationEnd of Presentation
Questions or Suggestions?
Thanks to all !!!