30 likes | 110 Views
human( david ). human(john). human( suzie ). human( eliza ). man( david ). man(john). woman( suzie ). woman( eliza ). parent( david , john). parent(john, eliza ). parent( suzie , eliza ). father(X,Y) :- parent(X,Y), man(X ). mother(X,Y) :- parent(X,Y), woman(X).
E N D
human(david). human(john). human(suzie). human(eliza). man(david). man(john). woman(suzie). woman(eliza). parent(david, john). parent(john, eliza). parent(suzie, eliza). father(X,Y) :- parent(X,Y), man(X). mother(X,Y) :- parent(X,Y), woman(X). ?- father(X, eliza). X = john ; http://en.wikibooks.org/wiki/Prolog/Rules • Constraint programming • Expert systems • Prolog • Inference engine • Knowledge base knowledge rules inference