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, facts and/or rules:
“Live in contact with dreams and you will get something of their charm: live in contact with facts and you will get something of their brutality. I wish I could find a country to live in where the facts were not brutal and the dreams not real.”
—George Bernard Shaw (18561950)
“A judge is not supposed to know anything about the facts of life until they have been presented in evidence and explained to him at least three times.”
—Parker, Lord Chief Justice (19001972)
“Retaliation is related to nature and instinct, not to law. Law, by definition, cannot obey the same rules as nature.”
—Albert Camus (19131960)