我是新來的prolog,並希望得到一些建議。parent_of prolog
我有一些事實:
male(tom).
male(james).
male(john).
female(elly).
female(joanne).
female(evonne).
brother(john,tom).
brother(john,joanne).
sister(elly,joanne).
parent_of(evonne,john).
parent_of(james,john).
是可以定義一個parent_of
規則,而不使用sister
和brother
?
[使用唯一的哥哥和妹妹規則的Prolog父母關係]的可能重複(http://stackoverflow.com/questions/15714834/prolog-parent-relation-using-only-brother-and-sister-rules) – 2013-04-05 16:56:09
那一個是使用姐姐和兄弟來定義我不想要的父母 – user1771844 2013-04-06 05:36:57