(defun GMP (P)
(let ((conclusions nil)) ;; the conclusions drawn
(dolist (C *beliefs*)
;; find the conditionals
(when (and (conditionalp C)
;; C is of the form (-> (& P1 ... Pn) Q)
(mem P (antecedent C))
;; P is one of the Pi
(every #'(lambda (r)
(or (equal r P)
(mem r *beliefs*)))
(cdr (antecedent C))))
;; every Pi is either P or a prior belief
(setf conclusions (cons (consequent C) conclusions))))
;; Add Q to the list of conclusions
conclusions))
Example:
(setf *beliefs*
'(
(-> (& P1 P2) Q)
P1
R
(-> (& P2 R) S)
))
(GMP 'P2) returns (S Q)
| Previous slide | Next slide | Back to first slide | View graphic version |