Title: Hint delivery


We are considering to use jess for our tutor system.  What is the best way to deliver the hints on user's request? I'm thinking about adding some behavioral events ("USER_ACTION", "HINT_REQUEST") to my java side, so I'll be able to store/restore the previous Rete state when student asks for a hint.  That would be great to be able to use the same rule for both action/hint events, something like this:

;;Define globals
(defglobal ?*cur_hints* = "init")

; Define templates
(deftemplate hints
  (multislot msgs))
(deftemplate goal
  (slot node1)
  (slot done (default N)))

(defrule step-or-hint
"fire the rule for a correct step or give a hint for this step"
  ?goal <- (goal(node1 ?node1))
=>
  (modify ?goal (done Y))
(modify ?*cur_hints* (assert (hints (msgs "Perform this step."))))
)

But I'm not sure that this will work.

I would greatly appreciate any help.

Thanks,
Olga Medvedeva.

Reply via email to