Presentation is loading. Please wait.

Presentation is loading. Please wait.

Route/Path Planning Materi Kuliah IF3051 – Strategi Algoritma Teknik Informatika – ITB Oleh: Masayu Leylia Khodra.

Similar presentations


Presentation on theme: "Route/Path Planning Materi Kuliah IF3051 – Strategi Algoritma Teknik Informatika – ITB Oleh: Masayu Leylia Khodra."— Presentation transcript:

1 Route/Path Planning Materi Kuliah IF3051 – Strategi Algoritma Teknik Informatika – ITB Oleh: Masayu Leylia Khodra

2 Referensi  Materi kuliah IF3054 Inteligensi Buatan Teknik Informatika ITB, Course Website:  STEI  Teknik Informatika  IF3054  Stuart J Russell & Peter Norvig, Artificial Intelligence: A Modern Approach, 3rd Edition, Prentice-Hall International, Inc, 2010, Textbook Site: (2nd edition)http://aima.cs.berkeley.edu/  Free online course materials | MIT OpenCourseWare Website: Site: and-computer-science/http://ocw.mit.edu/courses/electrical-engineering- and-computer-science/ IF3051/MLK/

3 Route Planning IF3051/MLK/

4 4 Search Source: Russell’s book S: set of cities i.s: A (Arad) g.s: B (Bucharest) Goal test: s = B ? Path cost: time ~ distance A 118 T S O Z R P F B C L M D

5 Uninformed Search IF3051/MLK/

6 6 Breadth-First Search (BFS) Path: A  S  F  B, Path-cost = 450 A 118 T S O Z R P F B C L M D Treat agenda as a queue (FIFO) Simpul-ESimpul Hidup AZ A,S A,T A ZAZA S A,T A,O AZ SASA T A,O AZ,O AS,F AS,R AS TATA O AZ,O AS,F AS,R AS,L AT O AZ O AS,F AS,R AS,L AT O AS F AS,R AS,L AT F AS R AS,L AT,B ASF R AS L AT,B ASF,D ASR,C ASR,P ASR L AT B ASF,D ASR,C ASR,P ASR,M ATL B ASF Solusi ketemu

7 IF3051/MLK/ Depth-First Search (DFS) Path: A  Z  O  S  F  B Path-cost = 607 A 118 T S O Z R P F B C L M D Treat agenda as a stack (LIFO) Simpul-ESimpul Hidup AZ A,S A,T A ZAZA O AZ, S A,T A O AZ S AZO,S A,T A S AZO F AZOS, R AZOS,S A,T A F AZOS B AZOSF, R AZOS,S A,T A B AZOSF Solusi ketemu

8 IF3051/MLK/ IDS Depth=0: A: cutoff Depth=1: A  Z A,S A,T A  Z A : cutoff, S A : cutoff, T A : cutoff Depth=2: A  Z A,S A,T A  O AZ, S A,T A  O AZ : cutoff  F AS, R AS,T A  F AS : cutoff  R AS : cutoff  L AT  L AT : cutoff Depth=3: A  Z A,S A,T A  O AZ, S A,T A  S AZO,S A,T A  S AZO : cutoff  F AS, R AS,T A  B ASF, R AS,T A  B ASF Stop: B=goal, path: A  S  F  B, path-cost = 450 O A 118 T S Z R P F B C L M D

9 IF3051/MLK/ Uniform Cost Search (UCS)  BFS & IDS find path with fewest steps  If steps ≠ cost, this is not relevant (to optimal solution)  How can we find the shortest path (measured by sum of distances along path)? O A 118 T S Z R P F B C L M D Simpul-ESimpul Hidup AZ A-75, T A-118, S A-140 Z A-75 T A-118, S A-140,O AZ-146 T A-118 S A-140,O AZ-146,L AT-229 S A-140 O AZ-146,R AS-220, L AT-229,F AS- 239,O AS-291 O AZ-146 R AS-220, L AT-229, F AS-239,O AS-291 R AS-220 L AT-229, F AS-239,O AS-291, P ASR- 317,D ASR-340,C ASR-366 L AT-229 F AS-239,O AS-291,M ATL-299, P ASR- 317,D ASR-340,C ASR-366 F AS-239 O AS-291,M ATL-299, P ASR-317,D ASR- 340,C ASR-366, B ASF-450 O AS-291 M ATL-299, P ASR-317,D ASR-340,C ASR- 366, B ASF-450 M ATL-299 P ASR-317,D ASR-340,D ATLM-364,C ASR- 366, B ASF-450 P ASR-317 D ASR-340,D ATLM-364,C ASR-366, B ASRP-418, C ASRP-455, B ASF-450 D ASR-340 D ATLM-364,C ASR-366, B ASRP-418, C ASRP-455, B ASF-450 D ATLM-364 C ASR-366, B ASRP-418, C ASRP-455, B ASF-450 C ASR-366 B ASRP-418, C ASRP-455, B ASF-450 B ASRP-418 Solusi ketemu Path: A  S  R  P  B Path-cost = 418

10 Informed Search IF3051/MLK/

11 Best-first search  Idea: use an evaluation function f(n) for each node  greedy best-first search: f(n) = h(n)  A * search: f(n) = g(n) + h(n)  e.g., h SLD (n) = straight-line distance from n to Bucharest  Romania with step costs in km 11IF3051/MLK/ g(n) = cost so far to reach n h(n) = estimated cost from n to goal f(n) = estimated total cost of path through n to goal

12 Greedy best-first search example 12IF3051/MLK/071112

13 Greedy best-first search example 13IF3051/MLK/071112

14 Greedy best-first search example 14IF3051/MLK/071112

15 Greedy best-first search example 15IF3051/MLK/071112

16 A * search example 16IF3051/MLK/071112

17 A * search example 17IF3051/MLK/071112

18 A * search example 18IF3051/MLK/071112

19 A * search example 19IF3051/MLK/071112

20 A * search example 20IF3051/MLK/071112

21 A * search example 21IF3051/MLK/071112

22 THANK YOU


Download ppt "Route/Path Planning Materi Kuliah IF3051 – Strategi Algoritma Teknik Informatika – ITB Oleh: Masayu Leylia Khodra."

Similar presentations


Ads by Google