Agents
Agents
Agents
CHAPTER
Outline
2
R
S S
L
R R
SS
L L
R
L
8 puzzle problem
1. Examples of Problem
Definitions
8-puzzle problem
15
Uninformed/Blind Informed
Uninformed/Blind Informed
Uninformed/Blind Informed
Breadth-First Search(BFS)
In breadth-first search, the tree or the graph is
traversed breadthwise, i.e. it starts from a node
called search key and then explores all the
neighbouring nodes of the search key at that depth-
first and then moves to the next level nodes. It is
implemented using the queue data structure that
works on the concept of first in first out (FIFO). It is
a complete algorithm as it returns a solution if a
solution exists
Advantages:
BFS will provide a solution if any solution exists.
If there are more than one solutions for a given
problem, then BFS will provide the minimal solution
which requires the least number of steps.
Disadvantages:
It requires lots of memory since each level of the tree
must be saved into memory to expand the next level.
BFS needs lots of time if the solution is far away from
the root node.
Artificial Intelligence a modern approach
Artificial Intelligence a modern approach 30
Artificial Intelligence a modern approach 31
Properties of breadth-first search
Complete? Yes (if b is finite)