Problem-Solving by Searching

Preview:

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

Citation preview

Problem-Solving by Searching

Uninformed (Blind) Search Algorithms

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

Problem-solving steps

Search/Planning

Execute

Problem

Formulate

Example: RomaniaFind 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 searchUniform-cost searchDepth-first searchA* search

failkey

Goal testexpand

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

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

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

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

Implementation: states vs. nodes

Evaluation

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

Breadth-first searchExpand 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

YesReturn fail

YesReturn node

Where should the new nodes be added in BFS?

Some strategy:

A

Some strategy:

B C

Some strategy:

C D E

Some strategy:

D E F G

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

Recommended