SCXT 350

Lab day on CLIPS

There are no assignments to be turned in from this lab.  An assignment on CLIPS will be made Monday after some further discussion of the examples.  In preparation for this lab you should have read and brought with you the CLIPS handout.

This lab is intended to get you started with CLIPS and the CLIPS editor.  There are two parts to this lab:  the first part gives you some experience in typing in a very short CLIPS file and running it.  In the second part, you are asked to load a CLIPS file and make a minor modification to it.

Part I: 

Start up the CLIPS editor and type in the following program:


; A simple CLIPS program
    (defrule useful-rule "a useful rule"
        (animal fierce)
        (animal big)
        (animal hungry)
    =>
        (assert (run away))
    )
;
    (deffacts initial-facts "some initial facts"
        (animal big)
        (animal hungry)
        (animal fierce)
    )
 

Then start up CLIPS, load this file, and run it.  See the CLIPS handout for a detailed description of how to do this.


Part II:

    Open the file example2.clp (in the handouts folder).  Run it.

    Modify rule-1 in example2.clip so that a message will be printed. Just after the assert statement , add the statement

(printout t "We suggest that " ?name " take a law major" crlf)

    Save this file, load it, and run it (with all the windows open).