Hey guys,

I am writing some test rules and I encounter some problems. I am also trying to use 
question-answer format like animal.clp, but the questions are categorical ones.  The 
template is like below:

(deftemplate node
        (slot name)
        (slot type)
        (slot question)
        (multislot cat1-node (slot cat-name) (slot goto))
        (multislot cat2-node (slot cat-name) (slot goto))
        (multislot cat3-node (slot cat-name) (slot goto))
        (multislot cat4-node (slot cat-name) (slot goto))
        (slot answer))

sample fact is like:

(node (name node1) (type decision) (question "What's the purpose of the gift?") 
(cat1-node (cat-name birthday-gift)(goto node2))(cat2-node (cat-name 
anniversary-gift)(goto node3))(ca3-node (cat-name wedding-gift)(goto node4))(cat4-node 
(cat-name holiday-gift)(goto node5))(answer nil))!!!!

The answer shall match one of the catname in cat-node. 

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).

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?
       
Thanks for any answers!


Best Regards,
Yingying Chen
2003-11-01

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to