Dan wrote:
For a project of mine I am attempting to implement an explanation facility for the expert system that I am building using Jess 6.0.We are doing something like this. On a rule's LHS, we remember the facts that activated the rule. On the RHS, we create a new fact and add the remebered facts to a list. Something like this:
Being a complete beginner in this domain I am after some information, if anyone can hep me.
The way I understand it is this: during a session on the expert system, the user will go through the questions/rules, which at the moment are just yes or no answers, the user may want to ask How? or Why? The expert system then answers the user by way of some message e.g. because rules x, y and z are true and rule b is false.
(defrule foo
?fact-1 <- (bar)
?fact-2 <- (bar)
?fact-3 <- (bar)
=>
(bind ?new-fact (new Baz))
(?new-fact setReason "Created by rule 'foo'.")
(?new-fact addFact (?fact-1))
(?new-fact addFact (?fact-2))
(?new-fact addFact (?fact-3))
(definstance Baz ?new-fact))
where Baz is a Java class that has methods "setReason" "addFact".
--
Richard Kasperowski
Tel: 617-576-1552, Fax: 617-576-2441
mailto:[EMAIL PROTECTED]
http://www.altisimo.com/
--------------------------------------------------------------------
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]
--------------------------------------------------------------------
