CLIPS - Facts and Rules

Facts and Rules

Like other expert system languages, CLIPS deals with rules and facts. Various facts can make a rule applicable. An applicable rule is then asserted. Facts and rules are created by first defining them, as shown below:

(deftemplate car_problem (slot name) (slot status) ) (deffacts trouble_shooting (car_problem (name ignition_key) (status on)) (car_problem (name engine) (status wont_start)) (car_problem (name headlights) (status work)) ) (defrule rule1 (car_problem (name ignition_key) (status on)) (car_problem (name engine) (status wont_start)) => (assert (car_problem (name starter) (status faulty))) )

In CLIPS, salience allows a user to assign priority (or weight) to a rule.

Read more about this topic:  CLIPS

Famous quotes containing the words facts and/or rules:

    Had Adam tenderly reproved his wife, and endeavored to lead her to repentance instead of sharing in her guilt, I should be much more ready to accord to man that superiority which he claims; but as the facts stand disclosed by the sacred historian, it appears to me that to say the least, there was as much weakness exhibited by Adam as by Eve. They both fell from innocence, and consequently from happiness, but not from equality.
    Sarah M. Grimke (1792–1873)

    Fergus rules the brazen cars,
    And rules the shadows of the wood,
    And the white breast of the dim sea
    And all dishevelled wandering stars.
    William Butler Yeats (1865–1939)