Sibling(X, Y) :- parent(Z, X), parent(Z,Y), X \= Y. The “rules” look like: grandparent(X, Y) :- parent(X, Z), parent(Z, Y).Īncestor(X, Y) :- parent(X, Z), ancestor(Z, Y). I wrote a quick Prolog Exporter for the upcoming Gramps 4.2 to test out how this would work on a good size family tree. But this could be done on your real family tree too. A standard example to learn what the language can do is to practice on a fake family tree. Prolog is a language for entering facts, and letting the system deduce new facts based on those. I teach a little of Prolog in both Artificial Intelligence and in Programming Languages. Sunday, May 17th, 2015 at 1:34 am by Doug Blank
0 Comments
Leave a Reply. |