Loading ...
Sorry, an error occurred while loading the content.

Re: [aima-talk] Rule in CLIPS

Expand Messages
  • Serguei Mokhov
    ... From: Alberto Vera Sent: September 11, 2002 3:34 PM ... Personally, I don t see anything wrong with your rule with
    Message 1 of 2 , Sep 16 7:56 AM
    • 0 Attachment
      ----- 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.

      hth,
      -s
    Your message has been successfully submitted and would be delivered to recipients shortly.