Académique Documents
Professionnel Documents
Culture Documents
B C D E F
Goal state
G H I J K L M N O P
Q R S T U V W X Y Z
Press space to see a BFS of the example node set
10/10/09 Biomedical Department, NIT Raipur 9
We
Node
Thethen
B
search
isbacktrack
expanded
then moves
to
then
expand
to
removed
thenode
firstfrom
C,
nodethe Node
This
We begin
node
A is removed
iswith
thenour
expanded
from
initialthe
state:
toqueue.
reveal
the Each
node
queue.
and
in the
theThe
queue.
process
revealed
Press
continues.
nodes
space Press
to
arecontinue.
added
spaceto the
A further
revealed
labeled(unexpanded)
A.
nodePress
is added
spacenodes.
to the
continue
Press
END space
of the
END of the queue. Press space. queue. Press space to continue the search.
B C D E F
G H I J K L M N O P
Node L is located and the search
returns a solution. Press space to end.
Q R S T U
Nodes expanded: 11
9876543210
10 CurrentFINISHED
Action: Backtracking
Expanding
SEARCH Current level: 210n/a
BREADTH-FIRST SEARCH PATTERN
10/10/09 Biomedical Department, NIT Raipur 10
Uninformed Search
Breadth-first search
• Breadth-first search merits
– Complete: If there is a solution, it will be
found
– Optimal: Finds the nearest goal state
• Breadth-first search problem:
• Time complexity
• Memory intensive
• Remembers all unwanted nodes
10/10/09 Biomedical Department, NIT Raipur 11
Uninformed Search
Depth-first search
• Always expands one
of the node at the s
deepest level of the
tree
• Only returns when the 1 2
search hits a dead end
• Implemented by 3 4 9 10
putting the newly
generated nodes at
the front of the queue
5 6 7 8 11 12 13 14
(0,0)
(4,0) (0,3)
(4,0) (0,3)
(0,0)
(4,0)
(4,3)