1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CLIPS control fact

Discussion in 'Programming/Internet' started by Harry, Sep 12, 2018.

  1. Harry

    Harry Guest

    I have this clips program that uses salience to get the message "Welcome to the advising system." to always appear first, but I was wondering how to do this using a control fact without the use of salience.

    1 (deffacts prerequisites
    2 (after COP1000 take COP2000)
    3 (after COP1001 take COP2001)
    4 (after MAC1000 take MAC2000)
    5 (after MAC1001 take MAC2001)
    6 (after ENG1000 and ENG1001 take ENG2000))
    8 (defrule welcome
    9 (declare (salience 10000))
    10 =>
    11 (printout t "Welcome to the advising system." crlf))
    13 (defrule rule2
    14 (after ?course1 take ?course2)
    15 (student ?name $? ?course1 $?)
    16 =>
    17 (printout t "Since " ?name " has taken " ?course1 " , I suggest taking " ?course2 "." crlf))

    Login To add answer/comment

Share This Page