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:

    In writing biography, fact and fiction shouldn’t be mixed. And if they are, the fictional points should be printed in red ink, the facts printed in black ink.
    Catherine Drinker Bowen (1897–1973)

    The duce of any other rule have I to govern myself by in this affair—and if I had one ... I would twist it and tear it to pieces, and throw it into the fire when I had done—Am I warm? I am, and the cause demands it—a pretty story! is a man to follow rules—or rules to follow him?
    Laurence Sterne (1713–1768)