Lecture Notes: Heuristic Search


1. Survey of Basic Search:

2. A* Search

           A*-Monotonic(Root)
             Open={Root}
             Closed={}
             loop
               if Open={} then return failure
               Node = pop(Open)
               if solution(Node) then return Node
               add Node to Closed
               remove from Open all nodes that terminate in the same position as Node
               Put new(*) children(Node) on Open
               sort Open by minimum f
           (*) new = positions not already on Closed

3. Lisp Facilities for Word Ladders:

           (setq Test1 "Foo")
           (setq Test2 Test1)            ; Test2 now points where Test1 pointed
           (setq Test3 (copy-seq Test1)) ; Test3 is a whole new string
           (setf (aref Test2 0) #\B)
Now, Test2 and Test1 are both "Boo" (since they both point to the same location). But changing Test3 wouldn't affect Test1/Test2.

           (setq *Numerals* (make-hash-table :test #'equal))
           (loop for I from 1 to 500 do
             (setf (gethash (format nil "~R" I) *Numerals*)
                   I))
           (gethash "twenty-three" *Numerals*) --> 23

Table of contents

1. - Survey of Basic Search:
2. - A* Search
3. - Lisp Facilities for Word Ladders: