[Home] [By Thread] [By Date] [Recent Entries]
>> Change the order of the rules for 'human', however, >> to 3412, however, and the system will have trouble >> figuring out even that 'adam' is human. > I fed both versions into GNU Prolog 1.2.1 and it > handled both with no problem. Michael's example wasn't quite right. Try descendant(cain,adam), then swap around descendant so that it is descendant(N,N2) :- descendant(N3,N2), parent(N,N3). descendant(N,N). and try again. It will recurse ad infinitum. Prolog just does a depth-first search. -- Richard
|

Cart



