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:

    Great abilites are not requisite for an Historian; for in historical composition, all the greatest powers of the human mind are quiescent. He has facts ready to his hand; so there is no exercise of invention. Imagination is not required in any degree; only about as much as is used in the lowest kinds of poetry. Some penetration, accuracy, and colouring, will fit a man for the task, if he can give the application which is necessary.
    Samuel Johnson (1709–1784)

    Different rules apply when it gets this late. You know what I mean? It’s, like, after hours.
    Joseph Minion, U.S. screenwriter, and Martin Scorsese. Peter (Rocco Sisto)