Best-First Search
- Initialize priority queue (e.g. a heap)
- Initialization includes an evaluation function to determine
priority
- Add an initial candidate to the heap
- This includes a number derived from the evaluation function
- Initialize visited candidate set
- Loop Forever
- Remove the top of the heap
- If the heap is empty, quit with failure
- If the candidate has been visited, skip the rest of the inner loop
- If not, add the candidate to the visited set
- Evaluate the candidate
- If the candidate is a solution, quit and return it
- Otherwise:
- Generate some new candidates from the candidate
- Add the new candidates to the heap
- Each candidate is prioritized by using the evaluation function