chp03 Searching Strategies
chp03 Searching Strategies
PROBLEM SOLVING
& SEARCH
Part II
Blind Search Strategies
Search Algorithms
You will learn 2 categories of searching
algorithm, i.e.
Blind search – covered in Part II
Heuristic search – covered in Part III
Search Algorithms
Blind search
Also known as uninformed search – a strategy that does not
know additional information about states beyond that
provided in the problem definition.
Search proceeds by generating successors and
distinguishing a goal state from non-goal state.
Algorithms include
Breadth-first search
Depth-first search
Uniform-cost search
Depth-limited search
Iterative deepening depth-first.
Search Algorithms
Heuristic search
Also known as informed search – a strategy that knows
whether one non-goal state is more promising than
another.
Algorithms include
Hill climbing
Best-first
Greedy search
A*
PROBLEM SOLVING
& SEARCH
Part III
Heuristic Search Strategies
HEURISTIC SEARCH
Heuristic (informed) search strategies
Strategies that know whether one non-goal state
is more promising than another.
Note:
The basic idea of heuristic search is,
“when you’re in a state and there are several choices of
operators to new states, evaluate each state by assigning a
number to it. The state which seems most promising is the
one to explore next”.
Heuristic search concepts
Heuristic evaluation function
Is a procedure which assigns numbers to choices (states) for
the purpose of determining what the best choice is.
Note: In one case, high numbers are desirable, and in the other, low
numbers.
Example 1
Tic-tac-toe problem
E-4 F-3
Limitation
No guarantee of finding a solution
▪ Keeps no history, cannot recover from failures
Tends to become a stuck at local maximum (can be
avoided with sufficient informative evaluation function)
2. Best-first search
Similar to hill climbing in that it explores the best
node first.
Unlike hill climbing, it is a global method.
States not chosen in the first instance are remembered for
possible future use.
Nature of solution:
A sort of combination of DFS and BFS
Start off by going depth (in the same way as hill climbing).
When things stop improving, going breadth by jumping
back up to previous nodes at a higher level in the tree.
Best-first search
How it works?
Best-first search
Best-first search
Example 2
8 Puzzle problem
8 Puzzle
Defining heuristics for this problem
(compare CS to GS)
g(n) = 0 a
b c d