BUILDING AGENTS
(defun cognize ()
(loop
(update-inputs)
(cognize-epistemically)
(cognize-practically)))
To allow termination, we can add a “catch”. Keep track of the number of times the program has looped using *cycle*.
(defun cognize ()
(catch 'cognize
(setf *cycle* 0) (setf *new-beliefs* nil)
(loop
(princ *cycle*) (princ ": ") (terpri)
(update-inputs)
(cognize-epistemically)
(cognize-practically)
(incf *cycle*))))
Previous slide
Next slide
Back to first slide
View graphic version