Does anyone know how I can have a Java GUI and and .CLP file integrated
together so that, when I press for example "YES" on a button the rule is
satisfied and fired. Consequently, if I press No then the rule is not
satisfied, leading to another question being displayed and so on until the
goal condition is satisfied???
For example small system which will decide whether choice of wine is
suitable for meal. Below is one rule example.
Prompt, What is the value of the main course Red_MEat/White_MEAT? Instead of
typing it, the user will press the appropriate button.
Rule 1
(?goal <- (goal (attribute main_course))
(not (attribute (name main_course)))
(not (rule (then ?main_course)))
=>
(retract goal main_course))
(printout t �What is the value of�
main_course �?�)
(assert (attribute (name main_course) (value (read)))))
Rule 2
(declare (salience 100))
(goal (attribute best_colour))
(attribute (name main_course)
(value red-meat))
?rule <- (rule (if main_course
is red-meat)
(then best_colour is red)
=>
(retract ?rule)
(printout t �choose� red �wine�)
Any suggestions woul be greatly appreciated
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------