0
我想讓一個人過敏,然後通過過敏來分裂過敏來斷言每個人。爲此,我使用do-backward-chaining
,assert-string
和readline
。將閱讀列表分解爲其元素
(do-backward-chaining allergies)
(defrule ask-allergies
(need-allergies nil)
=>
(printout t "Tell me your allergies (tomato, cheese): ")
(assert-string (str-cat "(allergies " (readline) ")")))
(defrule assert-allergies
(allergies $? ?a $?)
=>
(assert (allergy ?a)))
(reset)
(run)
但輸出此錯誤:
Jess reported an error in routine Context.getVariable
while executing (reset).
Message: No such variable _blank_mf1.