So we now want to rewrite our database using the following representation scheme:
Code: Select all
family([mom,dad],[[child1,female],[child2,male],[child3,male]]).
Code: Select all
parent_of(Parent,Child)
father_of(Father,Child)
mother_of(Mother,Child)
ancestor_of(Ancestor,Descendant) %% Should be recursive
sibling_of(Sib1,Sib2)
sister_of(Sister, Sibling)
brother_of(Brother,Sibling)
oldest_child (Parent,Oldest)
oldest_son (Parent,OldestSon)
oldest_daughter(Parent,OldestDaughter)
number_of_children(Parent,Num) %% Should use the 'is' predicate
number_of_sons(Parent,N).
number_of_daughters(Parent,N).
i will pay if needed. i am despair.
tzuriely@gmail.com