Partial preview of the text
Download Chapter 3: Blind Search - Lecture Notes | CS 542 and more Study notes Computer Science in PDF only on Docsity!
3.1 CHAPTER BLIND SEARCH We arguedl in the last chapter thal intelligent action invoives.seurch. and doscritusl a variely af specific problems whet seatch is needa far a so Julion—the &-puzzle. game playing, crossword-puzzle goncration, at cea soning or inference genorally. Li tins chapter and the next twa, wu exMmine search in a bit more dapth. ‘This elsapler discusses blind seatch, the next disonases heuristic: search, and Chapter § discusses search procedures that ace used in game playing, We have already peesonted algurithms lor depth-first search and breadth-tiret search, anti we hegin this chaple: by examining hese pro: cedturns a bit more clusely, Specifically. we consider the question of how riuch memory aud tine these algocithms need. In onder (o simplity the analysis. we will assume that we are working with a search treo of nnitarm branchiay twetue b und depth ¢, and that this troe has a single gral node thal is al depth d. A tron of this sort with b = 4 amd d= 2 appears in Figure 3.1. We have denoted the ruot node by 1, the nodes at depth 1 by ay. ne. Ms, and nig. and the childron af n, by sy thay feiss and ties Except for the fact thar it admils wultipls solutions, the crossword- puzzle problem can br: thought ui iu this way: We decide in advance on an ordor in which to iil the squares, view a completed crossword 2s a goal node if all of the words ere legal and distinct, and view the node as a hhongoal nade if one of these onndlitions és viulsted. Civen this interpre lation, the branching factor fur the cesssword-pezzle problam is 26. BREADTH-FIRST SEARCH ‘As discussed in Chapter 2, in becadth-ficsl search we shnmid view the list 1 of unexpanded nodes as a queue. so that newly generates! children ure Paton the end of this list and expanded only aller aedes at shallower deplas have boon examined. Thus during “le iirst lew iterations through the loop in Procedure 2.2.1, t-takes the following values 49