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:
“The sway of alcohol over mankind is unquestionably due to its power to stimulate the mystical faculties of human nature, usually crushed to earth by the cold facts and dry criticisms of the sober hour. Sobriety diminishes, discriminates, and says no; drunkenness expands, unites, and says yes.”
—William James (18421910)
“Science is built up with facts, as a house is with stones. But a collection of facts is no more a science than a heap of stones is a house.”
—Jules Henri Poincare (18541912)
“There are different rules for reading, for thinking, and for talking. Writing blends all three of them.”
—Mason Cooley (b. 1927)