0
これがなぜ機能しないのか分かりません。クリップOR発言が発砲しない
(defrule contain-red?
(initial-fact)
=>
(bind ?reply (get-text-from-user "Does it contain x (y/n?"))
(assert (existing-text ?reply)))
(defrule partOne
(existing-text "y")
=>
(bind ?reply (get-text-from-user "give me a number"))
(assert (credit-value-bsc-first-result (explode$ ?reply))))
(defrule partTwo
(existing-text "n")
=>
(bind ?reply (get-text-from-user "give me a number"))
(assert (credit-value-bsc-second-result (explode$ ?reply))))
(defrule learn-about-120?
(credit-value-bsc-first-result ?n)
(credit-value-bsc-second-result ?x)
(test (or (<= ?n 20) (<= ?x 20)))
=>
(bind ?reply (get-text-from-user "Reponse here)"))
(assert (learn-about-120-response ?reply)))
別のシナリオでは、とを使用して作業する最終ルールを取得できます。これをwxCLIPSにロードするときにエラーは表示されませんが、実行して関連するデータを入力すると、最終ルールは起動しません。
はありがとうございました!私は、変数が空である可能性があると感じていました。 – Joe