007 Uninformed Search
007 Uninformed Search
007 Uninformed Search
Uninformed Search
Topic & Structure of The Lesson
• Uninformed Search
• Breadth First Search
• Depth First Search
• Root
• Branch
• Breadth first search
• Depth first search
• In solving problems,
– possible actions our robot can do,
– possible moves in a chess game,
School Factory
Hospital Newsagent
Library church
Park University
• The set of all possible states reachable from the initial state defines the
search space.
• We can represent the search space as a tree.
library
school hospital
park newsagent
factory
university church
• We refer to nodes connected to and “under” a node in the tree as
“successor nodes”.
library
school hospital
park newsagent
factory
university church
library
school hospital
park newsagent
factory
university church
• Both algorithms keep track of the list of nodes found, but for which
routes from them have yet to be considered.
– E.g., [school, hospital] -have found school and hospital in tree,
but not yet considered the nodes connected to these.
• Loops: What if there are loops (ie, we are search a graph)? How do
you avoid (virtually) driving round and round in circles?
– Algorithm should keep track of which nodes have already been
explored, and avoid redoing these nodes.
• Returning the path: How do you get it to actually tell you what the
path it has found is!
– One way: Make an item on the agenda be a path, rather than a
node.
• Consider pet robot (or not very intelligent flat-mate) in small flat with
two rooms. You and your robot are in room1, your beer is in room 2,
the door is closed between the rooms.
• Actions:
– move(robot, Room, AnotherRoom)
– open(robot, door)
– pickup(robot, Object).
• Initial state:
– in(robot, room1) etc.
Me
Rob Beer
Me Me
Rob Beer Rob Beer
• Depth first and breadth first search turn out to be too inefficient for
really complex problems.
Q&A
• Informed Search