Re: [aima-talk] Rule in CLIPS
----- Original Message -----
From: "Alberto Vera" <artificialintelligenceperu@...>
Sent: September 11, 2002 3:34 PM
> (defrule warning
> ?suma <- (numerrores ?error)
> (> ?error 1)
> (retract ?suma)
> (printout t ?error " WARNING " ?error crlf)
> I want to execute this if ?error is > 1, but i don't see any message.
> What is wrong in my rule?
Personally, I don't see anything wrong with your rule with exception of one little thing,
but you haven't provided much of a context you are trying
to test your rule in anyway. For it to fire, you have to have
a fact (numerrores N) where N>1 in your facts base,
and change (> ?error 1) to (test (> ?error 1)) because
(> ?error 1) isn't really a fact and you are tyring to match it
as if it were one.