cs221-section1

cs221-section1 - Basic Search CS 221 Section 1 September...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Basic Search CS 221 Section 1 September 25, 2009 1 Introduction Today we will discuss some basic blind search algorithms and work some example problems involving them. These algorithms should be a review for most of you, as you have probably seen them in previous classes. 2 The problem Today we will focus on basic search on a directed graph. A directed graph G consists of: N , the set of nodes (vertices) in the graph E N N , the set of edges in the graph For a search problem on a graph we are trying to find a path in this graph from some start node s to some goal node g . Altogether, then our search problem consists of: A graph G = ( N,E ) A start node s N A goal node g N A solution to a search problem is a path from s to g . This can be represented as an ordered list of nodes ( n 1 ,n 2 ,...,n k ), where n 1 = s , n k = g , and each pair ( n i ,n i +1 ) E . 1 2.1 Terminology To expand , or investigate , a node n is to generate the set of all nodes which are connected to n by a directed edge. (i.e. the set of all nodes k such that ( n,k ) E ). The successor function is a function N 7 2 N which generates this set for each node. A node k is generated , or discovered , when a node n to which it is connected (i.e. ( n,k ) is in E ) is expanded. The fringe is the data structure we use to store all of the nodes that have been generated but not yet expanded. 2.2 Basic search idea We begin with only the start node s in the fringe. We then expand s , adding each of the successors of s to the fringe. A node in the fringe is selected, removed and expanded. When a node is removed from the fringe it is checked to see if it is the goal g . If it is we stop our search. 2.3 Search strategies A search strategy simply determines which node in the fringe to expand next. Today we will go over some of the more basic ones. 2.4 Measuring performance First we digress slightly to discuss the things we desire from a search algo- rithm. What are the ways we measure the performance of a search strategy or algorithm?...
View Full Document

This note was uploaded on 12/15/2009 for the course CS 221 at Stanford.

Page1 / 9

cs221-section1 - Basic Search CS 221 Section 1 September...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online