Download presentation
Presentation is loading. Please wait.
1
Pengantar Kecerdasan Buatan
INFORMED SEARCH
2
Informed Search Uninformed searches Informed searches easy
but very inefficient in most cases of huge search tree Informed searches uses problem-specific information to reduce the search tree into a small one resolve time and memory complexities
3
Informed Search Greedy best-first search A* search Uniform Cost Search
Another method : Heuristics Local search algorithms Hill-climbing search Simulated annealing search Local beam search Genetic algorithms
4
Romania with Straight-Line dist.
5
Greedy best-first search
f(n) = estimate of cost from n to goal e.g., fSLD(n) = straight-line distance from n to Bucharest Greedy best-first search expands the node that appears to be closest to goal.
6
Greedy best-first search example
7
Greedy best-first search example
8
Greedy best-first search example
9
Greedy best-first search example
10
Properties of greedy best-first search
Complete? No – can get stuck in loops. Time? O(bm), but a good heuristic can give dramatic improvement Space? O(bm) - keeps all nodes in memory Optimal? No e.g. AradSibiuRimnicu VireaPitestiBucharest is shorter!
11
A* search Idea: avoid expanding paths that are already expensive
Evaluation function f(n) = g(n) + h(n) 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 has f(n)=h(n)
12
A* search example
13
A* search example
14
A* search example
15
A* search example
16
A* search example
17
A* search example
18
Uniform Cost Search Prinsip : Lakukan node expansion terhadap node yang path cost-nya paling kecil Jika semua step costnya sama, uniform cost sama dengan BFS
19
Contoh UCS
24
Arad ke Bucharest menggunakan UCS
25
8 Puzzle, using A* Search
26
Water Jug using UCS Mengisi wadah 3 L s.d. Penuh
Membuang isi wadah 3 L Menuangkan isi wadah 3 L ke 4 L s.d 4 L penuh Menuangkan isi wadah 3 L ke 4 L s.d 3 L kosong Mengisi wadah 4 L s.d. Penuh Membuang isi wadah 4 L Menuangkan isi wadah 4 L ke 3 L s.d 3 L penuh Menuangkan isi wadah 4 L ke 3 L s.d 4 L kosong
27
Cost Cost is 1 point per gallon used when filling, 1 point to make a transfer, 5 points per gallon emptied (since it makes a mess) How to get 2 L ?
28
Water Jug using UCS (Cont)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.