Download presentation
Presentation is loading. Please wait.
Published byMatthew Rodney Bennett Modified over 9 years ago
1
Intelligent Systems (2II40) C3 Alexandra I. Cristea September 2005
2
Outline II.Intelligent agents III.Search 1.Uninformed 2.Informed A.Heuristic B.Local C.Online
3
Iterative deepening search Depth first search with growing depth l l = allowed maximal depth in tree
4
Iterative deepening search example Arad l = 0
5
Iterative deepening search example Arad l = 1
6
Iterative deepening search example l = 1 Arad ZerindSibiuTimisoara
7
Iterative deepening search example Arad l = 2
8
Iterative deepening search example l = 2 Arad ZerindSibiuTimisoara
9
Iterative deepening search example l = 2 AradOradea Arad ZerindSibiuTimisoara
10
Iterative deepening search example l = 2 Arad SibiuTimisoara OradeaFagarash Ramnicu Valcea
11
Iterative deepening search example l = 2 Arad Timisoara AradLugoj
12
Proprieties of iterative deepening search Complete?Complete? Yes (b,d finite) Time?Time? (d+1) + db + (d-1)b 2 + …+ b d = O(b d ) Space?Space? O(bd) Optimal?Optimal? Yes (b,d finite & cost/step=1)
13
Outline II.Intelligent agents III.Search 1.Uninformed 2.Informed A.Heuristic B.Local C.Online
14
Uniform cost search Expand least cost node first Implementation: increasing cost order queue = min(cost/step): the smallest step cost
15
Ex: Romania w. step costs (km)
16
Uniform cost example Arad
17
Uniform cost example Arad ZerindSibiuTimisoara 75 140 118
18
Uniform cost example Arad Sibiu 75 140 118 AradOradea Zerind 75+75= 150 75+71= 146 Timisoara AradLugoj 236 111+118= 229
19
Uniform cost example Arad Sibiu 75 140 118 AradOradea Zerind 150 146 Timisoara AradLugoj 220 229 AradOradea Ramnicu Valcea Fagarash 280 239 291236
20
Uniform cost example Arad Sibiu 75 140 118 AradOradea Zerind 150 146 Timisoara AradLugoj 220 229 AradOradea Ramnicu Valcea Fagarash 280 239 291236 Zerind Sibiu 297217
21
Uniform cost example Arad Sibiu 75 140 118 AradOradea Zerind 150 146 Timisoara AradLugoj 220 229 AradOradea Ramnicu Valcea Fagarash 280 239 291236 Zerind Sibiu 297217 225 290 268
22
Uniform cost example Arad Sibiu 75 140 118 AradOradea Zerind 150 146 Timisoara AradLugoj 220 229 AradOradea Ramnicu Valcea Fagarash 280 239 291236 Zerind Sibiu 297217 225 290 268 SibiuPitestiCraiova 300 317 382
23
Uniform cost example Arad Sibiu 75 140 118 AradOradea Zerind 150 146 Timisoara AradLugoj 220 229 AradOradea Ramnicu Valcea Fagarash 280 239 291236 Zerind Sibiu 297217 225 290 268 SibiuPitestiCraiova 300 317 382
24
Properties of uniform cost search Complete?Complete? Yes (b,d finite & cost/step ) Optimal?Optimal? Yes (b,d finite & cost/step ) Time?Time? O(b C*/ ) ( C* : cost optimal solution) Space?Space? O(b C*/ )
25
III.2. Informed search algorithms
26
III.2. Informed Search Strategies A. Heuristic –Best-first search Greedy search A* search B. Local –Hill climbing –Simulated annealing –Genetic algorithms
27
Best first search f(n)f(n) : evaluation function: –desirability of n Implementation: –queue of decreasing desirability
28
Greedy search f(n) = h(n)f(n) = h(n), h(n): heuristic : distance from n to goal expands n closest to goal admissibleImportant: heuristic should be admissible: –h(n) h*(n), with: –h*(n)= real cost from n to goal
29
Example Greedy search Map of Romania possible heuristic : h sld (n) = straight_line_distance (n, Bucharest)
30
Greedy search example Arad 366
31
Greedy search example 366 Arad ZerindTimisoara 374 253 329 Sibiu
32
Greedy search example 366 Arad ZerindTimisoara 366 253 329 Arad Sibiu Oradea Ramnicu Valcea 380178193 Fagarash 374
33
Greedy search example 366 Arad ZerindTimisoara 366 253 329 Arad Sibiu Oradea Ramnicu Valcea 380178193 Fagarash SibiuBucharest 2530 374
34
Properties of Greedy search Complete?Complete? No (could get stuck in loops) Optimal?Optimal? No Time?Time? O(b m ) Space?Space? O(b m )
35
Homework 3 – part 1 1.Check Dijkstra’s Greedy algorithm and shortly compare! 2.Give 3 recent applications of a (modified) Greedy algorithm. Explain in what consists the application, evtl. the modification, and give your source.
36
A* search f(n) = g(n) + h(n)f(n) = g(n) + h(n): –g(n) –g(n): real (!!) cost from start to n –h(n) –h(n): heuristic: distance from n to goal NOTE: –considers the whole cost incurred from start to goal at all times !!
37
A* search example Arad 366
38
A* search example 366 Arad ZerindTimisoara 374+75 =449 393 447 Sibiu 75 140 118
39
A* search example 366 Arad ZerindTimisoara 646 393 447 Arad Sibiu Oradea Ramnicu Valcea 671417413 Fagarash 75 140 118 140 151 99 80 449
40
A* search example 366 Arad ZerindTimisoara 646 393 447 Arad Sibiu Oradea Ramnicu Valcea 671417413 Fagarash 75 140 118 140 80 449 SibiuCraiovaPitesti 80 146 97 553526 415 151 99
41
A* search example 366 Arad ZerindTimisoara 646 393 447 Arad Sibiu Oradea Ramnicu Valcea 671417413 Fagarash 75 140 118 140 80 449 SibiuCraiovaPitesti 80 146 97 553526 415 Rm.VilceaCraiova Bucharest 607 615 418 97 138 101 151 99
42
A* search example 366 Arad ZerindTimisoara 646 393 447 Arad Sibiu Oradea Ramnicu Valcea 671417413 Fagarash 75 140 118 140 80 449 Sibiu Bucharest 591450 211 99 SibiuCraiovaPitesti 80 146 97 553526 415 Rm.VilceaCraiova Bucharest 138 101 97 607 615 418 151 99
43
Properties of A* search Complete?Complete? Yes (if # nodes w. f C* finite) Optimal?Optimal? Yes; optimally efficient!! Time?Time? O (b (rel. err. in h) x (length of solution) ) Space?Space? All nodes in memory
44
Optimality A* Be G optimal goal state (path cost f*) Be G2 suboptimal goal state (local minimum) f(G2) = g(G2) (heuristic zero in goal state) f(G2) > f* (G2 suboptimal) n fringe node on optimal path to G h is admissible : f(n) = g(n) + h(n) g(n) + h*(n) = f*. f(n) f*< f(G2) n will be chosen instead of G2, q.e.d.
45
Improved A* alg. IDA* = A* + iterative deepening depending on f RBFS = recursive depth first search + remembering value of best ancestor; space=O(bd) MA* = memory bound A* (use of available memo only) SMA* = simple MA* (A*; if memo full, discard worst node, but store f value of children w. parents)
46
Summary (un-)informed search Uninformed – ‘blind’ –computationally cheaper (heuristic?) Research continues on finding better search –i.e., problem solving algorithms Informed + uninformed: –global search algorithms –exponential time+space (10 120 molecules in universe)
47
Homework 3 - part 2 3. Read the LAO* paper find the different notations used by the author for the properties of the search algorithm and make a table of equivalences; Describe LAO* in terms of these properties; comment upon dimensions of AI (as in C1) that you find in the LAO* algorithm.LAO* paper
48
II.2.B. Local Search Greedy local search (hill-climbing) Simulated annealing Genetic algorithms
49
Homework 3 – part 2 7.Perform steps FAQ 5-6 of the project.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.