As we have defined it, the pattern matcher matches one input against one pattern. In el i
Question:
As we have defined it, the pattern matcher matches one input against one pattern. In el i za, we need to match each input against a number of patterns, and then return a result based on the rule that contains the first pattern that matches. To refresh your memory, here is the function use-el i za - rul es:
(defun use-eliza-rules (input)
"Find some rule with which to transform the input."
(some #'(lambda (rule)
( l e t ((result (pat-match (rule-pattern rule) input) 1)
( i f (not (eq result f a i l ) )
(sub1 is (switch-viewpoint result)
(random-el t (rul e-responses rul el 1) 1)
*eliza-rules*))
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Paradigms Of Artificial Intelligence Programming Case Studies In Common Lisp
ISBN: 9781558601918
1st Edition
Authors: Peter Norvig
Question Posted: