Intelligent Systems 2II40 C3 - PowerPoint PPT Presentation

1 / 49
About This Presentation
Title:

Intelligent Systems 2II40 C3

Description:

Uniform cost search. Expand least cost node first. Implementation: increasing cost order queue ... Give 3 recent applications of a (modified) Greedy algorithm. ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 50
Provided by: wwwisW
Category:

less

Transcript and Presenter's Notes

Title: Intelligent Systems 2II40 C3


1
Intelligent Systems (2II40)C3
  • Alexandra I. Cristea

September 2005
2
Outline
  • Intelligent agents
  • Search
  • Uninformed
  • Informed
  • Heuristic
  • Local
  • Online

3
Iterative deepening search
  • Depth first search with growing depth
  • l allowed maximal depth in tree

4
Iterative deepening search example
l 0
Arad
5
Iterative deepening search example
l 1
Arad
6
Iterative deepening search example
l 1
Arad
Zerind
Sibiu
Timisoara
7
Iterative deepening search example
l 2
Arad
8
Iterative deepening search example
l 2
Arad
Zerind
Sibiu
Timisoara
9
Iterative deepening search example
l 2
Arad
Zerind
Sibiu
Timisoara
Arad
Oradea
10
Iterative deepening search example
l 2
Arad
Sibiu
Timisoara
Arad
Oradea
Fagarash
Ramnicu Valcea
11
Iterative deepening search example
l 2
Arad
Timisoara
Arad
Lugoj
12
Proprieties of iterative deepening search
  • Complete? Yes (b,d finite)
  • Time? (d1) db (d-1)b2 bd O(bd)
  • Space? O(bd)
  • Optimal? Yes (b,d finite cost/step1)

13
Outline
  • Intelligent agents
  • Search
  • Uninformed
  • Informed
  • Heuristic
  • Local
  • Online

14
Uniform cost search
  • Expand least cost node first
  • Implementation increasing cost order queue
  • e min(cost/step) the smallest step cost

15
Ex Romania w. step costs (km)
16
Uniform cost example
Arad
17
Uniform cost example
Arad
118
75
140
Zerind
Sibiu
Timisoara
18
Uniform cost example
Arad
118
75
140
Sibiu
Zerind
Timisoara
7575 150
111118 229
7571 146
236
Arad
Oradea
Arad
Lugoj
19
Uniform cost example
Arad
118
75
140
Sibiu
Zerind
Timisoara
150
229
146
280
220
239
291
236
Arad
Oradea
Arad
Lugoj
Arad
Oradea
Ramnicu Valcea
Fagarash
20
Uniform cost example
Arad
118
75
140
Sibiu
Zerind
Timisoara
150
229
146
280
220
239
291
236
Arad
Oradea
Arad
Lugoj
Arad
Oradea
Ramnicu Valcea
Fagarash
297
217
Sibiu
Zerind
21
Uniform cost example
Arad
118
75
140
Sibiu
Zerind
Timisoara
150
229
146
280
220
239
291
236
Arad
Oradea
Arad
Lugoj
Arad
Oradea
Ramnicu Valcea
Fagarash
297
217
Sibiu
225
Zerind
290
268
22
Uniform cost example
Arad
118
75
140
Sibiu
Zerind
Timisoara
150
229
146
280
220
239
291
236
Arad
Oradea
Arad
Lugoj
Arad
Oradea
Ramnicu Valcea
Fagarash
297
217
300
382
317
Sibiu
225
Sibiu
Pitesti
Craiova
Zerind
290
268
23
Uniform cost example
Arad
118
75
140
Sibiu
Zerind
Timisoara
150
229
146
280
220
239
291
236
Arad
Oradea
Arad
Lugoj
Arad
Oradea
Ramnicu Valcea
Fagarash
297
217
300
382
317
Sibiu
225
Sibiu
Pitesti
Craiova
Zerind
290
268
24
Properties of uniform cost search
  • Complete? Yes (b,d finite cost/step ? e)
  • Optimal? Yes (b,d finite cost/step ? e)
  • Time? O(bC/e 1) (C cost optimal solution)
  • Space? O(bC/e 1)

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) evaluation function
  • desirability of n
  • Implementation
  • queue of decreasing desirability

28
Greedy search
  • f(n) h(n),
  • h(n) heuristic distance from n to goal
  • expands n closest to goal
  • Important 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
  • hsld(n) straight_line_distance (n, Bucharest)

30
Greedy search example
Arad
366
31
Greedy search example
Arad
366
Zerind
Timisoara
Sibiu
374
329
253
32
Greedy search example
Arad
366
Zerind
Timisoara
Sibiu
329
374
253
Arad
Oradea
Ramnicu Valcea
Fagarash
366
380
178
193
33
Greedy search example
Arad
366
Zerind
Timisoara
Sibiu
329
374
253
Arad
Oradea
Ramnicu Valcea
Fagarash
366
380
178
193
Sibiu
Bucharest
253
0
34
Properties of Greedy search
  • Complete? No (could get stuck in loops)
  • Optimal? No
  • Time? O(bm)
  • Space? O(bm)

35
Homework 3 part 1
  • Check Dijkstras Greedy algorithm and shortly
    compare!
  • 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)
  • g(n) real (!!) cost from start to 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
Arad
366
118
75
140
Zerind
Timisoara
Sibiu
37475 449
447
393
39
A search example
Arad
366
118
75
140
Zerind
Timisoara
Sibiu
449
447
393
140
80
151
99
Arad
Oradea
Ramnicu Valcea
Fagarash
646
671
417
413
40
A search example
Arad
366
118
75
140
Zerind
Timisoara
Sibiu
449
447
393
140
80
151
99
Arad
Oradea
Ramnicu Valcea
Fagarash
646
671
417
413
80
97
146
Sibiu
Craiova
Pitesti
415
553
526
41
A search example
Arad
366
118
75
140
Zerind
Timisoara
Sibiu
449
447
393
140
80
151
99
Arad
Oradea
Ramnicu Valcea
Fagarash
646
671
417
413
80
97
146
Sibiu
Craiova
Pitesti
415
553
526
101
138
97
Rm.Vilcea
Craiova
Bucharest
615
607
418
42
A search example
Arad
366
118
75
140
Zerind
Timisoara
Sibiu
449
447
393
140
80
151
99
Arad
Oradea
Ramnicu Valcea
Fagarash
646
671
417
413
99
80
97
146
211
Sibiu
Bucharest
Sibiu
Craiova
Pitesti
415
553
526
591
450
101
138
97
Rm.Vilcea
Craiova
Bucharest
615
607
418
43
Properties of A search
  • Complete? Yes (if nodes w. f ? C finite)
  • Optimal? Yes optimally efficient!!
  • Time? O (b(rel. err. in h) x (length of
    solution))
  • 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) gt 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) ? ?flt 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 spaceO(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 timespace (10120 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.

48
II.2.B. Local Search
  • Greedy local search (hill-climbing)
  • Simulated annealing
  • Genetic algorithms

49
Homework 3 part 2
  • Perform steps FAQ 5-6 of the project.
Write a Comment
User Comments (0)
About PowerShow.com