1 / 20

Pertemuan 3 Heuristic Search Techniques Generate-and-Test

Pertemuan 3 Heuristic Search Techniques Generate-and-Test. Matakuliah : T0264/Inteligensia Semu Tahun : Juli 2006 Versi : 2/1. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : << TIK-99 >> << TIK-99>>. Outline Materi. Materi 1 Materi 2 Materi 3

faris
Download Presentation

Pertemuan 3 Heuristic Search Techniques Generate-and-Test

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Pertemuan 3Heuristic Search Techniques Generate-and-Test Matakuliah : T0264/Inteligensia Semu Tahun : Juli 2006 Versi : 2/1

  2. Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : • << TIK-99 >> • << TIK-99>>

  3. Outline Materi • Materi 1 • Materi 2 • Materi 3 • Materi 4 • Materi 5

  4. Search Strategis A. Blind Search : • Breadth-first search • Depth-first search B. Heuristic Search : • Generate-and-test • Hill climbing • Best-first search • Problem reduction • Constrain satisfaction • Means-ends analysis

  5. 3.1 Generate-and-Test Algorithm : Generate-and-Test • Generate a possible solution. • Test to see if this actually a solution by comparing the chosen point or the endpoint of the chosen path to the set of acceptable goal states. • If a solution has been found, quit. Otherwise, return to step1.

  6. 8 A B 7 5 4 3 C D 6 Generate-and-Test • Sales Traveling Problem Dengan Menggunakan Generate and test bisa ditentukan lintasan terpendek yang harus ditempuh oleh sales.

  7. 3.2 Hill-Climbing Algorithm : Simple Hill – Climbing • Evaluate the initial state. If it is also a goal state, then return it and quit. Otherwise, continue with the initial state as the current state. • Loop until a solution is found or until there are no new operators left to be applied in the current state : • Select an operator that has not yet been applied to the current state and apply it to produce a new state.

  8. Algorithm : Simple Hill – Climbing • Evaluate the new state. i. If it is a goal state, then return it and quit. • If it is not a goal state but it is better than the current state, then make it the current state. iii. If it is not better than the current state, then continue in the loop.

  9. Algorithm : Steepest – Ascent Hill Climbing • Evaluate the initial state. If it is also a goal state, then return it and quit. Otherwise, continue with the initial state as the current state. • Loop until a solution is found or until a complete iteration produces no change to current state : a. Let SUCC be a state such that any possible sucessor of the current state will be better than SUCC.

  10. Algorithm : Steepest – Ascent Hill Climbing • For each operator that applies to current state do : i. Apply the operator and generate a new state. ii. Evaluate the new state. If it is goal state, then return it and quit. If not, compare it to SUCC. If it is better, then set SUCC to this state. If it is not better, leave SUCC alone. c. If the SUCC is better than current state, then set current state to SUCC.

  11. Kasus Sales Hill Climbing Operator yang digunakan : • Tukar kota 1 dengan 2 • Tukar kota 2 dengan 3 • Tukar kota 3 dengan 4 • Tukar kota 4 dengan 1 • Tukar kota 2 dengan 4 • Tukar kota 1 dengan 3

  12. ABCD/19 BACD/12 ACBD/12 ABDC/18 DBCA/12 ADCB/18 CBAD/20 ABCD/19 BCAD/15 BADC/12 DACB/12 BDCA/15 CABD/16 Simple H. C. Steepest Acsent H. C. Kasus Sales dengan Hill Climbing

  13. Hill - Climbing Dangers

  14. A H H G G F F E E D D C C B B A Initial State Goal State A Hill Climbing Problem

  15. G F E D H C B A (b) A H G G F F E E D D C C B A H B (c) (a) Three Possible Moves

  16. A A (3) (5) B C D (1) B (3) C (5) D E (4) F (6) A A B C D B C D (5) (5) G (6) H (5) G (6) H (5) E (4) F (6) E F (6) I (2) J (1) 3.3 Best – First Search Step 1 Step 2 Step 3 Step 4 Step 5 A

  17. Algorithm : Best - First Search • Start with Open containing just the initial state • Until a goal is found or there are no nodes left on Open do: (a) Pick the best node on Open. (b) Generate its successors. (c) For each successor do : • If it has not been generate before, evaluate it, add it to Open, and record its parent. • If it has been generate before, change the parent if this new path is better than previous one. In that case, update the cost of getting to this node and to any successors that this node may already have.

  18. A B (3+1) C (4+1) D (5+1) E (3+2) F (3+3) Underestimates

  19. A B (3+1) C (4+1) D (5+1) E (2+2) F (1+3) G (0+4) Overestimates

  20. << CLOSING>> End of Pertemuan 3 Good Luck

More Related