"Paradigms of AI Programming" Errata Sheet Peter Norvig The following have been reported, but have not been incorporated for one of two reasons. (1) Some I consider too unimportant to fix, given the cost of correcting a page. I may change my mind if others have the same complaints. (2) Others are just too expensive to fix, because they involve changing multiple pages. There is a cost for each page that is changed; it is not possible to just add new material without figuring how to change the surrounding pages. Certainly if there is a 2nd edition (as opposed to a 2nd printing), then some of these should be addressed. Page Chapter 1: Certain basic functions (listp, atom) are not presented. Page 13: "The last expression" ==> "The value of the last expression" Page 52: (if ...) "is the value." Also Page 53. Page 55: /* Pascal */ ==> { Pascal } or (* Pascal *) Page 68: dot notation used before explained. Page 74: gethash references get, which was not introduced. Page 92: incf, decf could be used in the definition of bank-account Page 114, 129: Change doc string for appropriate-p to: "An op is appropriate to a goal if the goal is in the op's add-list." Page 146: 2nd para in 4.20 is probably not what you want to say about NP. at least add "as the size of the problem grows LINEARLY." Page 182: change "of symbols like ?*" ==> "of symbols like ?is" Page 230: change "~%~a~{~% ~{ ~a~}~}~%" ==> "~%~a~{~% ~{ ~a~}~}~%" i.e. two blanks instead of one Page 234: line -3 n unknowns ==> $m \le n$ unknowns. Page 239: Para 4: survive ==> survived. Page 259: section 8.7 cite with name (..) consistently.. e.g. Moses (1975) ==> Moses 1975 There is a better book by Geddes Labahn and Czapor (1992) that covers this stuff. Page 272: 3. You write: "The trick is that memoize takes this new function and makes it the symbol-function value of the function name. This means that all the references in the original function will now go to the new function ..." Essentially, this is the trick, but someone who is not that familiar with closures and the difference between symbols and local variables might wonder how the memoized version of fib does call the unmemoized version of fib. As you explained, the recursive call to fib in the definition of fib uses the symbol fib, so this compiles into a fetch of the symbol-function of fib (which results in the memoized version), but the call "(funcall fn x)" in the memoized version uses the function bound to the local (lexical) variable fn which is the original version. I think you should explicitly explain this, and maybe add a reference to section 3.16 (closures) and to the end of section 3.17 (special variables) which explains symbol-value which is analog to symbol-function. Page 285: in the definition of "sieve" change "(mod x (headpipe))" ==> "(mod x (head pipe))" Page 315: perhaps remove "the following" since you have another sentence next.. Page 341: 4. Unfortunately, in the subsection about Queues (Page 341ff) you haven't given a concise and abstract definition of Queues, and your implementation of ``dequeue is a bit awkward in that it returns the queue instead of the dequeued element. I suggest changing this to be consistent with the operation ``pop'' for stacks which is nothing but a ``dequeue'' for LIFO-Queues (see the article from Norvig and Waters in LISP Pointers). In addition, at least give a hint that it might be more efficient to use vectors instead of lists for implementing queues -- after all it is a chapter about efficiency issues. A reference to your LISP Pointer article might be useful too. Page 437: Need some guard against depositing a negative amount. Page 440: in function make-clause: rest2 is not defined, could just use cddr Page 442: 3rd paragraph, 3rd line: "as argument" ==> "as an argument" Page 451: need "(debug 'search)" before "(searcher p1)" Page 465: 2nd pp, line 2: "was" ==> "is" Page 466: "1982" ==> "(1982)" Page 474: The discussion of d-trees is very useful, but the figure 14.1 may confuse people who think that the boxes are cons-cells (cf. p 77) in the d-tree. dtrees are made of dtree nodes. I'm not sure how to remedy this since figure 14.1 is in some ways quite nice. Page 537: I find the discussion confusing about (parm inst). The example is unclear because the difference between an instance and a name of an instance (patient) is hard to grok. How about at line 11 or so, saying For example, an instance of a patient, PATIENT-1 will have a name with complete certainty\footnote{After all, this is MYCIN not (Perry) MASON}, so (NAME PATIENT-1) will have a value ((1.0 "Sylvia Fisher")). On the other hand, (IDENTITY ORGANISM-1) may have a collection of certainty factors like ((0.4 pseudomonas) (-0.2 streptococcus)). Page 657: an example might help.. e.g Sentences now include "the woman liked the verb". Page 695 bottom, I think you are using \epsilon when you should be using the "element of" character. Maybe the TeX name is \in . Page 734: "present-plural" in the call to verb might be better named "3rd-person-sing" Page 811: line -11: "less" ==> "fewer" Page 826: Deutsch 1980 ==> Deutsch (1980). Page 882: 3. In section 25.14 about "Problems with Macros" your example pop-end is probably better written as a function. It does not violate the usual evaluation rules, and this was just explained to be a mistake, so it's probably not a padagogically valuable example. 4. Its great to have some examples for setf methods included in section 25.14, but the transition from the pop-end macro to a setf method for last on page 883 is not very obvious. In addition, it would be nice to shed some more light on setf methods: they are called methods but actually they are macros. In ANSI Common Lisp the confusion is even greater: Now there are 4 ways to define setf "methods" (defsetf ...) (define-setf-method ...) (defmethod setf ...) (defun (setf ...) ...) Why not including an extra section on setf methods? Page 919: I'd prefer for index entries like *state* to sort under S. Page 924: the entry for "Common Lisp" could be omitted. Page Bibliography: The editor tag is missing on various "Readings in" entries Whenever there's a label including an "et al." a backslash is missing after it in the source making TeX to produce an inter-sentence spacing. Probably this is just an error in the BibTeX-style. See pages 234, 382, and 383 for example.