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

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

Transcript of Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Page 1: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Problem-Solving by Searching

Uninformed (Blind) Search Algorithms

Page 2: 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

Page 3: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Problem-solving steps

Search/Planning

Execute

Problem

Formulate

Page 4: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Example: Romania

Find a route from one city (Arad) to the other (Bucharest)

Page 5: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Problem formulation

Also called child-generator

(Zerind, Sibiu, Timisoara)

Page 6: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Selecting a state space

Page 7: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Vacuum world state space graph

Page 8: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Example: The 8-puzzle

Page 9: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Tree search algorithms

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

failkey

Goal testexpand

Page 10: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

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 Uninformed (Blind) Search Algorithms.

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

YesReturn fail

YesReturn node

Page 12: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

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 (Blind) Search Algorithms.

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 Uninformed (Blind) Search Algorithms.

Implementation: states vs. nodes

Page 15: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Evaluation

Page 16: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

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 Uninformed (Blind) Search Algorithms.

Breadth-first searchExpand node with the smallest depth first

Page 18: Problem-Solving by Searching Uninformed (Blind) 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

YesReturn fail

YesReturn node

Where should the new nodes be added in BFS?

Page 19: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Some strategy:

A

Page 20: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Some strategy:

B C

Page 21: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Some strategy:

C D E

Page 22: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

Some strategy:

D E F G

Page 23: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
Page 24: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
Page 25: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
Page 26: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
Page 27: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
Page 28: Problem-Solving by Searching Uninformed (Blind) Search Algorithms.

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