On 5/7/07, Mike Stopper <[EMAIL PROTECTED]> wrote: I'm having trouble getting my head set straight on this one..
Hi Mike, I seem to have some luck with this... (clear) (watch all) (defrule only-when-NOT-starts-with-B-and-D-present (not(value /B.*/)) (not(value /D.*/)) => (printout t "B* and D* NOT present" crlf) ) ;; PROGRAM (reset) (assert (value "aa")) ;(assert (value "Bb")) knock this out... (assert (value "cc")) ;(assert (value "Dd")) this too... (assert (value "ee")) (run) ;; OUTPUT ;;======== ;MAIN::only-when-starts-with-B-and-D-present: +1+1+1+1+1+2+1+2+t ; ==> Focus MAIN ; ==> f-0 (MAIN::initial-fact) ;==> Activation: MAIN::only-when-starts-with-B-and-D-present : f-0,, ; ==> f-1 (MAIN::value "aa") ; ==> f-2 (MAIN::value "cc") ; ==> f-3 (MAIN::value "ee") ;FIRE 1 MAIN::only-when-starts-with-B-and-D-present f-0,, ;B* and D* NOT present ; <== Focus MAIN Is this not what you wanted? Cheers, Jason ----------------------------------------------------------- Jason C. Morris Worcester Polytechnic Institute Phone: (508) 831-5006 Department of Computer Science FAX: (508) 831-5776 Fuller Laboratories - Room 312 [EMAIL PROTECTED] Artificial Intelligence Lab (AIRG) 100 Institute Road Worcester, MA 01609-2280 -----------------------------------------------------------
