I'm trying to learn CLIPS and this is a very basic question. I have facts for two people (person (name "jim")(age 22)) and (person (name "sally")(age 32)) and I simply want a rule that will print out who is older, or assert some fact like ( older (name "xxx")). I was trying
(defrule compare "is jim older"
( person ( name "jim")(age ?jims_age))
( person ( name "sally")( age ?sallys_age))
(> ?jims_age ?sallys_age)
=>
(printout t "jim is older" crlf))
Which never activates. So what is the right way to compare jim and sally's ages? I can't find an easy example that does this.
Thank you!