problem-solving by searching

28
Problem-Solving by Searching Uninformed (Blind) Search Algorithms

Upload: shani

Post on 22-Feb-2016

48 views

Category:

Documents


0 download

DESCRIPTION

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. Problem. Formulate. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Problem-Solving by Searching

Problem-Solving by Searching

Uninformed (Blind) Search Algorithms

Page 2: Problem-Solving by Searching

Project 1 is out, check class homepageDue in two weeks 9/27/2010 Monday before class

Projects for students in different groups (480/580/796) could be different later on

Page 3: Problem-Solving by Searching

Problem-solving steps

Search/Planning

Execute

Problem

Formulate

Page 4: Problem-Solving by Searching

Example: RomaniaFind a route from one city (Arad) to the other (Bucharest)

Page 5: Problem-Solving by Searching

Problem formulation

Also called child-generator(Zerind, Sibiu, Timisoara)

Page 6: Problem-Solving by Searching

Selecting a state space

Page 7: Problem-Solving by Searching

Vacuum world state space graph

Page 8: Problem-Solving by Searching

Example: The 8-puzzle

Page 9: Problem-Solving by Searching

Tree search algorithms

Breadth-first searchUniform-cost searchDepth-first searchA* search

failkey

Goal testexpand

Page 10: Problem-Solving by Searching

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

FIFOLIFOPriority

Page 11: Problem-Solving by Searching

Flowchart of search algorithmsInitialize 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

YesReturn fail

YesReturn node

Page 12: Problem-Solving by Searching

Arad

Sibiu Timisoara Zerind

Arad Fagaras Oradea R.V.

???

A F O RV T ZS T ZA

Is empty?Remove firstIs goal?Expand & add

Initialize

Page 13: Problem-Solving by Searching

Uninformed vs. informed search

No problem-specific knowledge about states Can only distinguish a goal state from a non-goal

state Strategies that know whether one non-goal state is

“more promising” than another are called informed (heuristic) search

Page 14: Problem-Solving by Searching

Implementation: states vs. nodes

Page 15: Problem-Solving by Searching

Evaluation

Page 16: Problem-Solving by Searching

Uninformed search strategies Also called blind search Can only distinguish goal state and non-goal state Do not know which state is more “promising”

Breadth-first search Uniform-cost search Depth-first search Depth-limited search Iterative deepening depth-first search

Page 17: Problem-Solving by Searching

Breadth-first searchExpand node with the smallest depth first

Page 18: Problem-Solving by Searching

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

YesReturn fail

YesReturn node

Where should the new nodes be added in BFS?

Page 19: Problem-Solving by Searching

Some strategy:

A

Page 20: Problem-Solving by Searching

Some strategy:

B C

Page 21: Problem-Solving by Searching

Some strategy:

C D E

Page 22: Problem-Solving by Searching

Some strategy:

D E F G

Page 23: Problem-Solving by Searching
Page 24: Problem-Solving by Searching
Page 25: Problem-Solving by Searching
Page 26: Problem-Solving by Searching
Page 27: Problem-Solving by Searching
Page 28: Problem-Solving by Searching

Example of breadth-first search

Memory requirements are a bigger problem than is the time Exponential-complexity search problems cannot be solved

by uninformed methods for any but the smallest instances