SEARCHING (2)

12
KECERDASAN BUATAN SEARCHING (2)

description

SEARCHING (2). KECERDASAN BUATAN. Metode Pencarian Heuristik. Heuristik berasal dari bahasa Yunani yang berarti ‘mencari’ atau ‘menemukan’. - PowerPoint PPT Presentation

Transcript of SEARCHING (2)

Page 1: SEARCHING (2)

KECERDASAN BUATAN

SEARCHING (2)

Page 2: SEARCHING (2)

Metode Pencarian Heuristik

Heuristik berasal dari bahasa Yunani yang berarti ‘mencari’ atau ‘menemukan’.

Heuristik dapat diartikan sebagai proses yang mungkin dapat menyelesaikan suatu asalah tetapi tidak ada jaminan bahwa solusi yang dicari selalu dapat di termukan.

Heurisitik suatu fungsi yang memberikan suatu nilai berupa biaya perkiraan (estimasi) dari suatu solusi

Page 3: SEARCHING (2)

Generate and Test

Metode yang paling sederhanaAlgoritma GT menggunakan prinsip dasar

Depth First Search

Page 4: SEARCHING (2)

Generate and Test Algorithm

1. Generate a possible solution. For some problems, this means generating a particularpoint in the problem space. For others, it means generating a path from a start state.

2. Test to see if this is actually a solution by comparing the chosen point or endpoint of the chosen path to the set of acceptable goal states.

3. If a solution has been found, quit. Otherwise, return to step 1.

Page 5: SEARCHING (2)

Best First Search

Metode yang membangkitkan suksesor dengan mempertimbangkan harga (didapat dari fungsi heuristik tertentu) dari setiap node.

BFS memilih simpul baru yang memiliki biaya terkecil diantara semua leaf nodes (simpul – simpul pada level terdalam)

Page 6: SEARCHING (2)

Best First Search

Page 7: SEARCHING (2)

Algoritma Best-First Search

1. Start with OPEN containing just the initial state.2. 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:i. If it has not been generated, evaluate it, add it to OPEN, and record its parent.ii. If it has been generated, change the parent if this new path is better than the previous one. In that case, update the cost of getting to this node and to any successors that this node may already have.

Page 8: SEARCHING (2)

Greedy Best-First Search

Salah satu jenis algoritma Best-First Search yang paling sederhana dengn hanya memperhitungkan biaya perkiraan sajaf(n) = h(n)

Page 9: SEARCHING (2)

Contoh

n           S       A       B       C       D      E       F      G      H     J          K         L       Mh(n)    80     80   60    70    85    74    70    0    40    100    30     20    70

Page 10: SEARCHING (2)

Greedy Best-First Search

Complete ? No, can get stuck in loops

Complete if repeated-state checking is performed

Time ? O(bm), but good heuristic can give dramatic improvement

Space ? O(bm) – save all nodes in memory

Optimal ? No, Why ?

Page 11: SEARCHING (2)

A* (A Bintang)

Algoritma BFS yang menggabungkan Uniform Cost Search dan Greedy Best-First Search.

Biaya yang diperhitungan = biaya sebenarnya + biaya perkiraanf(n) = g(n) + h(n)

Page 12: SEARCHING (2)

Iterative Deepning A* (IDA*)Simplified Memory-Bounded A*Bi-directioinal A*Modified Bi-directional A*Dynamic Weighting A*Beam A*