Presentation is loading. Please wait.

Presentation is loading. Please wait.

Route/Path Planning Materi Kuliah IF3051 – Strategi Algoritma

Similar presentations


Presentation on theme: "Route/Path Planning Materi Kuliah IF3051 – Strategi Algoritma"— 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) Free online course materials | MIT OpenCourseWare Website: Site: and-computer-science/ IF3051/MLK/071112

3 Route Planning IF3051/MLK/071112

4 Search Source: Russell’s book O F S Z A R B P D M T L C
118 T S O Z R P F B C L M D 111 75 71 151 99 97 120 146 138 101 211 70 140 80 S: set of cities i.s: A (Arad) g.s: B (Bucharest) Goal test: s = B ? Path cost: time ~ distance IF3051/MLK/071112

5 Uninformed Search IF3051/MLK/071112

6 Breadth-First Search (BFS)
Treat agenda as a queue (FIFO) O 71 S F Z 151 99 211 75 A 140 80 R B 97 P 120 101 118 Simpul-E Simpul Hidup A ZA,SA,TA ZA SA,TA,OAZ SA TA,OAZ,OAS,FAS,RAS TA OAZ,OAS,FAS,RAS,LAT OAZ OAS,FAS,RAS,LAT OAS FAS,RAS,LAT FAS RAS,LAT,BASF RAS LAT,BASF,DASR,CASR,PASR LAT BASF,DASR,CASR,PASR,MATL BASF Solusi ketemu D 75 138 M 146 T 70 111 L C Path: A S  F  B, Path-cost = 450 IF3051/MLK/071112

7 Depth-First Search (DFS)
Treat agenda as a stack (LIFO) O 71 S F Z 151 99 211 75 A 140 80 R B 97 P 120 101 118 D 75 M 146 138 T 70 111 L Simpul-E Simpul Hidup A ZA,SA,TA ZA OAZ, SA,TA OAZ SAZO,SA,TA SAZO FAZOS, RAZOS,SA,TA FAZOS BAZOSF, RAZOS,SA,TA BAZOSF Solusi ketemu C Path: A Z  O  S  F  B Path-cost = 607 IF3051/MLK/071112

8 IDS O A 118 T S Z R P F B C L M D 111 75 71 151 99 97 120 146 138 101 211 70 140 80 Depth=0: A: cutoff Depth=1: A  ZA,SA,TA  ZA: cutoff, SA: cutoff, TA: cutoff Depth=2: A  ZA,SA,TA  OAZ, SA,TA  OAZ : cutoff  FAS, RAS,TA  FAS : cutoff  RAS : cutoff  LAT  LAT : cutoff Depth=3: A  ZA,SA,TA  OAZ, SA,TA  SAZO,SA,TA  SAZO: cutoff  FAS, RAS,TA  BASF, RAS,TA  BASF Stop: B=goal, path: A S  F  B, path-cost = 450 IF3051/MLK/071112

9 Uniform Cost Search (UCS)
Simpul-E Simpul Hidup A ZA-75, TA-118, SA-140 ZA-75 TA-118, SA-140,OAZ-146 TA-118 SA-140,OAZ-146,LAT-229 SA-140 OAZ-146,RAS-220, LAT-229,FAS-239,OAS-291 OAZ-146 RAS-220, LAT-229, FAS-239,OAS-291 RAS-220 LAT-229, FAS-239,OAS-291, PASR-317,DASR-340,CASR-366 LAT-229 FAS-239,OAS-291,MATL-299, PASR-317,DASR-340,CASR-366 FAS-239 OAS-291,MATL-299, PASR-317,DASR-340,CASR-366, BASF-450 OAS-291 MATL-299, PASR-317,DASR-340,CASR-366, BASF-450 MATL-299 PASR-317,DASR-340,DATLM-364,CASR-366, BASF-450 PASR-317 DASR-340,DATLM-364,CASR-366, BASRP-418, CASRP-455, BASF-450 DASR-340 DATLM-364,CASR-366, BASRP-418, CASRP-455, BASF-450 DATLM-364 CASR-366, BASRP-418, CASRP-455, BASF-450 CASR-366 BASRP-418, CASRP-455, BASF-450 BASRP-418 Solusi ketemu 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 111 75 71 151 99 97 120 146 138 101 211 70 140 80 Path: A S  R  P  B Path-cost = 418 IF3051/MLK/071112

10 Informed Search IF3051/MLK/071112

11 Best-first search Romania with step costs in km
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 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., hSLD(n) = straight-line distance from n to Bucharest Romania with step costs in km IF3051/MLK/071112

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

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

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

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

16 A* search example IF3051/MLK/071112

17 A* search example IF3051/MLK/071112

18 A* search example IF3051/MLK/071112

19 A* search example IF3051/MLK/071112

20 A* search example IF3051/MLK/071112

21 A* search example IF3051/MLK/071112

22 THANK YOU


Download ppt "Route/Path Planning Materi Kuliah IF3051 – Strategi Algoritma"

Similar presentations


Ads by Google