Problem-Solving by Searching Uninformed (Blind) Search Algorithms
Project 1 is out, check class homepage Due in two weeks 9/27/2010 Monday before class Projects for students in different groups (480/580/796) could be different later on
Problem-solving steps Search/Planning Execute Problem Formulate
Example: Romania Find a route from one city (Arad) to the other (Bucharest)
Problem formulation Also called child-generator (Zerind, Sibiu, Timisoara)
Selecting a state space
Vacuum world state space graph
Example: The 8-puzzle
Tree search algorithms Breadth-first search Uniform-cost search Depth-first search A* search Breadth-first search Uniform-cost search Depth-first search A* search fail key Goal test expand
Implementation of search algorithms Search algorithms differ based on the specific queuing function they use All search algorithms must do goal-test only when the node is picked up for expansion FIFO LIFO Priority FIFO LIFO Priority
Flowchart of search algorithms Initialize queue with the initial state Is the queue empty? Is this node a goal? Remove the first node from the queue No Generate children and add them into the queue according to some strategy No Yes Return fail Yes Return node
Arad Sibiu Timisoara Zerind Arad Fagaras Oradea R.V. ??? AFORVTZ STZ A Is empty? Remove first Is goal? Expand & add Is empty? Remove first Is goal? Expand & add Initialize
Uninformed vs. informed search u No problem-specific knowledge about states u Can only distinguish a goal state from a non-goal state u Strategies that know whether one non-goal state is “more promising” than another are called informed (heuristic) search
Implementation: states vs. nodes
Evaluation
Uninformed search strategies u Also called blind search u Can only distinguish goal state and non-goal state u Do not know which state is more “promising” u Breadth-first search u Uniform-cost search u Depth-first search u Depth-limited search u Iterative deepening depth-first search
Breadth-first search Expand node with the smallest depth first
Initialize queue with the initial state Is the queue empty? Is this node a goal? Remove the first node from the queue No Generate children and add them into the queue according to some strategy No Yes Return fail Yes Return node Where should the new nodes be added in BFS?
Some strategy: A
BC
CDE
DEFG
Example of breadth-first search u Memory requirements are a bigger problem than is the time u Exponential-complexity search problems cannot be solved by uninformed methods for any but the smallest instances