Chapter-3 Problem Solving
Chapter-3 Problem Solving
leve2
leve3
leve4
Uniformed Search…
Nodes are explored in the level like
leve0,level1,level2,level3,level as follows
ABCDEFGHIJKLM
I G1 G2
• The goal node J will be found before the goal node M.
• Search requires considerable memory resource.
• Similar to BFS, DFS search requires considerable memory
space
Uniformed Search…
2) DFS(Depth First Search):is also blind/exhaustive search
algorithm in which search starts at initial node and searches up
to some depth in one direction.
• If goal node is found, it stop the search process, otherwise you
can do backtracking.
Uniformed search…
Example:
Let initial node=A and goal node=M and J
Uniformed search…
• Nodes are explored as A B D E H L M I N O F GJ
I G1 G2
Given
Initial
state
Apply technique
Produce
new state
YES
NO
New sate is goal state
Goal state
Local maxima
starts
Local Maxima
Limitation of hill climbing…
2. Plateau
•A plat area of search space in which all neighboring states have the same value
•So in plateau search stops at particular point because of plat value will found at
particular point.
•This is limitation of hill climbing
•Fore example, in figure below , node A,B And C have the same value.
•The equality represents plateau.
Goal state
Plateau
starts
Plateau
4. A* search
•Also called Best First Search
•The lowest heuristic function value is called most
promising node and that node is expanded in
next level
• A* search has three function such as f(n), g(n) and h(n)
Law: f(n)= g(n)+h(n)
g(n)= edge cost
h(n)= estimated cost from node n to goal node
f(n)= estimated total cost of path from node n to goal node
•It has 2lists:
{OPEN} and {CLOSE} lists.
Initially the OPEN list contains initial node and CLOSE list
contains empty.
A* search…
Example: Find shortest path from initial node S to goal node G using A* search
algorithm
A* search…
• Exploring S:
A* search…
Goal : Own TV
Steal TV
BUY TV
Forward reasoning
• In forward reasoning the search start from initial
state and reaching to goal state.
Backward reasoning:
• In back ward reasoning the search start from goal
state to reach initial node
Backward
reasoning Goal state
Forward
Initial state reasoning