I think Yingying Chen wrote: > > My first question is that how I can match the answer with one of the catname in > cat-node as cat-node is multislot in the defrule. I need it to write (defrule > proceed-to-next-branch). >
The animals.clp example has an extra level of indirection in it, representing the decision tree as data so that it can be modified at runtime. If that's what you want, then that's OK; otherwise, you might consider a different approach altogether, like the one used by the PC Repair Assistant in "Jess in Action". > My second question is that as some nodes will have only final decisions without > question and category slots. Shall I write another deftemplate for it or use the > above one? Can two deftemplates work together? > A slot of a fact can hold either a Fact object, or the numeric ID of a fact. The latter is better if you want to persist the data to a flat file using save-facts; otherwise the former is a better approach. --------------------------------------------------------- Ernest Friedman-Hill Science and Engineering PSEs Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------