I have these facts
(person "Mark")
(person "Nail")
(person "Stark")
(person "Maria")
(married "Stark" "Maria")
I defined the following rule
(defrule single
(not (married ?x ?))
(not (married ? ?x))
=> (assert (single ?X)))
This gives me the following error:
Undefined variable ?x references in RHS if defrule
Everything is working fine why if I use this:
(defrule single
(person ?x)
(not (married ?x ?))
(not (married ? ?x))
=> (assert (single ?X)))
Why?