How to make fact in multiple type? like in this code get the same rank fact together.
(P X Y) means X is Y's elder member i had tried this:
(deffacts people
(P a b)
(P b c)
(P a d)
(P d e)
(P d f)
)
(defrule ranking
(P ?x ?y)
(P ?y ?z)
=>
(assert (R ?x $?y $?z))
)
i want to make a complete seniority in the family, and get (R a bd cef), but i just get (R a b c) (R a d e) (R a d f) can u help me?