1 / 21

Pengantar Kecerdasan Buatan

Pengantar Kecerdasan Buatan. 5 – Local Search AIMA Ch. 4.1– 4.2. Local Search Algorithms. In many optimization problems, the path to the goal is irrelevant; the goal state itself is the solution State space = set of "complete" configurations

yoo
Download Presentation

Pengantar Kecerdasan Buatan

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. Pengantar Kecerdasan Buatan 5 – Local Search AIMA Ch. 4.1– 4.2

  2. Local Search Algorithms Oscar Karnalim, S.T., M.T. In many optimization problems, the path to the goal is irrelevant; the goal state itself is the solution State space = set of "complete" configurations Find configuration satisfying constraints, e.g., n-queens In such cases, we can use local search algorithms keep a single "current" state, try to improve it

  3. Example: n-queens Oscar Karnalim, S.T., M.T. Put n queens on an n × n board with no two queens on the same row, column, or diagonal

  4. Hill-climbing Search Oscar Karnalim, S.T., M.T. "Like climbing Everest in thick fog with amnesia"

  5. Hill-climbing Search (Cont) Oscar Karnalim, S.T., M.T. Problem: depending on initial state, can get stuck in local maxima

  6. Hill-climbing Search: N-puzzles Oscar Karnalim, S.T., M.T.

  7. Hill-climbing Search: N-puzzles (Cont) Oscar Karnalim, S.T., M.T.

  8. Traveling Salesman Problem (TSP) • Problem: Seorang salesman ingin mengunjungi n kota. Jarak antar kota sudah diketahui. Kita ingin mengetahui rute terpendek yang dilalui dengan syarat tiap kota hanya boleh dikunjungi tepat 1 kali. • Fungsi heuristik: Rute berikutnya harus lebih pendek dari rute saat ini 8 B A 3 4 7 5 C D 6

  9. TSP - Hill Climbing Operator: menukar urutan posisi 2 kota dalam satu lintasan Fungsi heuristik: panjang lintasan

  10. Properties of Hill Climbing Oscar Karnalim, S.T., M.T. Complete? No, may never find an answer Time? May be very slow Space? Constant Optimal? No, may not find the best answer

  11. Hill Climbing Weaknesses Oscar Karnalim, S.T., M.T.

  12. Simulated Annealing Search Oscar Karnalim, S.T., M.T. Idea: escape local maxima by allowing some "bad" moves but gradually decrease their frequency

  13. Properties of simulated annealing search • One can prove: If T decreases slowly enough, then simulated annealing search will find a global optimum with probability approaching 1 • Widely used in VLSI layout, airline scheduling, etc

  14. Local beam search • Keep track of k states rather than just one • Start with k randomly generated states • At each iteration, all the successors of all k states are generated • If any one is a goal state, stop; else select the k best successors from the complete list and repeat.

  15. Genetic algorithms • A successor state is generated by combining two parent states • Start with k randomly generated states (population) • A state is represented as a string over a finite alphabet (often a string of 0s and 1s) • Evaluation function (fitness function). Higher values for better states. • Produce the next generation of states by selection, crossover, and mutation

  16. Genetic algorithms (1) • Fitness function: number of non-attacking pairs of queens (min = 0, max = 8 × 7/2 = 28) • 24/(24+23+20+11) = 31% • 23/(24+23+20+11) = 29% etc

  17. Genetic algorithms (2) Oscar Karnalim, S.T., M.T.

  18. Genetic algorithms

  19. Latihan Local Search Initial state Goal state Selesaikanlah 8 puzzle berikut dengan menggunakan algoritma greedy search, A* dan Hill climbing

  20. Referensi Oscar Karnalim, S.T., M.T. Russell, Stuart J. & Norvig, Peter. Artificial Intelligence: A Modern Approach (3rd ed.). Prentice Hall. 2009 Luger, George F. Artificial Intelligence: Structures and Strategies for Complex Problem Solving. 6th Edition. Addison Wesley. 2008. Watson, Mark., Practical Artificial Intelligence Programming in Java, Open Content – Free eBook (CC License), 2005.

More Related