I developed a user-level (i.e., not a Jess modification) backtracking capability about a year and a half ago. I've been meaning to shake it out and contribute it, but never got around to it. I'm happy to share it, though, if you're interested (and would be interested in constructive feedback for improving it).
Sidney Bailin Knowledge Evolution, Inc. [EMAIL PROTECTED] www.kevol.com ----- Original Message ----- From: "Sander Faas" <[EMAIL PROTECTED]> To: "'Jess users'" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 11:59 AM Subject: JESS: Backward chaining definstance facts > Hello, > > My agent has a knowledgebase in which every fact is a definstance fact. The > reason for this is that I use the Jade ontology support which specifies all > concepts, predicates and actions in the agent's world. This ontology support > maps all elements (concepts, predicates etc.) on Java classes. > > For example the predicate (have :POSSESSION (pencil) :OWNER (human :NAME > Jaap)) results in the following fact: > > (MAIN::have(class <External-Address:java.lang.Class>) (owner > <External-Address:storyagents.storyworldontology.Human>) (possession > <External-Address:storyagents.storyworldontology.Pencil>) (OBJECT > <External-Address:storyagents.storyworldontology.Have>) > > Suppose I have a rule that says: if I want to write and I have a pencil, > then I will write. This could be done in the following manner: > > (defrule write > (want-to-write) > (have (possession ?p)) > (pencil (OBJECT ?p)) > => > (printout t "I am writing" crlf) > ) > > However, I want to use backtracking and do something like: > (do-backward-chaining have) > (defrule write > (want-to-write) > (have (possession ?p <of type pencil>)) > => > (printout t "I am writing" crlf) > ) > > Is such a thing possible? The problem with the first method is that if I use > backward chaining all I get is an empty need-have fact (all slots nil). > An additional question: is it possible to let need-have only be asserted > when (want-to-write) - a non-backward-chaining fact - is asserted? > > Bye, > Sander > > > -------------------------------------------------------------------- > 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] > -------------------------------------------------------------------- > > -------------------------------------------------------------------- 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] --------------------------------------------------------------------
