6.034 Artificial Intelligence - Recitations, fall 2004 online slides on search

Next: Search Strategies Previous: General Search Example

Search Function

We will first look at search algorithms that are uninformed
Note: the Lectures use the word "enqueued" for "open list"

    ; SEARCH function
    open = (list initial)       ; Keep track of the open list, all generated
				; states that have not been expanded
    while open                  ; One iteration of search algorithm
       state = (first open)     ; Let first item be current world state
       open  = (rest open)      ; Remove current state from open list
       if (goal state)          ; Test to see if current state satisfies goal
          then SUCCEED          ; Search is complete
                                ; Expand the current state (generate children)
       else                     ; Reorder list according to search strategy
	  open = (queueing-fn open (expand state))
    FAIL