Download presentation
Presentation is loading. Please wait.
Published byFelix Hensley Modified over 9 years ago
1
Informed Search methods 5 주 강의
2
Best-first Search Evaluation function ::: a number purporting to described the desirability of expanding the node Best-first search ::: a node with the best evaluation is expanded first 자료구조가 중요 !!! Queue 를 사용하되 linked list 로 구현 ???
3
Greedy search heuristic function h(n) h(n) = estimated cost of the cheapest path from the state at node n to a goal state 현재부터 가장 가까운 거리에 있는 것 Hill climbing method
4
Iterative improvement algorithm Hill climbing method Simulated annealing Neural networks Genetic algorithm
5
Hill climbing Method Simple hill climbing method ::: 연산을 적용한 결과가 goal 인지 검사 후, 아니면 기존보다 좋으면 무조건 선택, 아니면 다른 연산 적용, 더 이상 적용할 연산이 없으 면 실패 선택한 노드에서 다시 탐색 Steepest-ascent hill climbing method ::: 현재 노드 ( 상태 ) 에 모든 가능한 연산을 적용한 결과 에 goal 이 있으면 성공, 아니면 제일 좋은 것을 선택하여, 기존보다 좋으면 그 노드에서 다시 탐색, 아니면 실패 Complete 하지 못함
6
예제 A H G F E D C B H G F E D C B A
7
First move H G F E D C B A
8
Second move(Three possible moves) A H G F E D C B G F E D C B G F E D C B H A AH (a) (b) (c)
9
Two heuristics Local : Add one point for every block that is resting on the thing it is supposed to be resting on. Subtract one point for every block that is sitting on the wrong thing goal : 8 initial state : 4 first move : 6 second move: (a) 4, (b) 4, (c) 4 Global : For each block that has the correct support structure, add one point for every block in the support structure. For each block that has an incorrect support structure, subtract one point for every block in the existing support structure goal : 28, initial : -28; first move : -21; second move: (a) – 28, (b) – 16, (c)-15
10
Hill climbing method 의 약점 Local maxima Plateau Ridges Random-restart hill climbing Simulated annealing
11
알고리즘 for t 1 to ∞ do T schedule[t] if T=0 then return current next a randomly selected successor of current ∆E Value[next]-Value[current] if ∆E>0 then current next else current next only with probability e ∆E /T 이동성 P=e ∆E /T (P=e- ∆E /kT 일반적으로 에너지가 낮은 방향으로 물리현상은 일어나지만 높은 에너지 상황으로 변하는 확률이 존재한다. ∆E : positive change in energy level T : Temperature k : Boltzmann ’ s constant
12
f(n)=g(n)+h(n) f(n) = estimated cost of the cheapest solution through n Best-first search Heuristic Search
13
Admissible heuristics ::: an h function that never overestimates the cost to reach the goal If h is a admissible, f(n) never overestimates the actual cost of the best solution through n Minimizing the total path cost (A * algorithm)
14
The behavior of A * search Monontonicity ::: along any path from the root, the f-cost never decreases -- underestimate 하면 non-monotonic 할 수 있음 Complete and optimal f(n ’ ) = max(f(n),g(n ’ )+h(n ’ )) (n 이 n ’ 의 parent node) optimality 와 completeness 를 증명한다
15
A * Algoritmd 의 예 8(16)-puzzle 에서 City block distance (Manhattan distance) 를 사용 : 절대 overestimate 하지 않는다 … h1 ::: the number of titles in wrong position h2 ::: Manhattan distance 결과비교 dIDSA*(h1)A*(h2) 14 3473941(2.83)539(1.42)73(1.24) 24 불가능 39135(1.48)1641(1.26)
16
Inventing heuristic functions Relaxed problem (a) 타일은 인접한 장소로 움직일 수 있다 (b) 타일은 빈자리로 이동할 수 있다 (c) 타일은 다른 위치로 이동할 수 있다 h(n)=max(h 1 (n), …,h n (n)) 실제 값과 가 장 가까이 예측하는 함수가 좋다
17
Heuristics for CSPs Most-constrained-variable heuristics :: forward checking the variable with fewest possible values is chosen to have a value assigned Most-constraining-variable heuristics :: assigning a value to the variable that is involved in the largest number of constraints on the unassigned variables (reducing the branching factor)
18
Example
19
Memory Bounded Search Simplified Memory-Bound A *
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.