AI - Problem Solving by Searching
AI - Problem Solving by Searching
Classical Approach
The classical approach takes hit and trial
method to have solution of a problem.
Two representations
Goal
Examples of representing problems
in state space
Blocks world planning
8-puzzle, 15-puzzle
8 queens
Travelling salesman
Set covering
In blocks world:
actions may have different costs
(blocks have different weights, ...)
Depth-first search
Breadth-first search
Iterative deepening
Informed, heuristic search
Best-first search
Hill climbing, steepest descent
Algorithm A*
Beam search
Algorithm IDA* (Iterative Deepening A*)
Algorithm RBFS (Recursive Best First
Search)
Direction of search
Forward search: from start to goal
Bidirectional search
In expert systems:
Forward chaining
Backward chaining
Depth-first search
Properties of depth-first search
program
Is not guaranteed to find shortest solution first
Susceptible to infinite loops (should check for
cycles)
Has low space complexity: only proportional to
depth of search
Only requires memory to store the current path
from start to the current node
When moving to alternative path, previously
searched paths can be forgotten
Iterative deepening search
Depth-limited search may miss a solution if
depth-limit is set too low
a
b c
d e f g
[[[c,a],
[d,b,a],
[[ [a] ][d,b,a],
[b,a], initial
[e,b,a],
[c,a] list[f,c,a],
][e,b,a]of candidate
after [g,c,a]
] expanding
after ] paths
a
expanding b
Shortest
solution
Time Space guaranteed
Breadth-first bd bd yes
Depth-first bdmax dmax no
Iterative deepening bd d yes
That’s All
Thank You
28