Problem Solving With Prolog -

Questions you ask the system (e.g., ?- grandparent(bob, Who). ). 2. How Prolog "Thinks" Prolog solves problems using two primary mechanisms:

Prolog is famous for solving complex logical puzzles with very little code: Problem Solving with Prolog

Logical implications (e.g., grandparent(X, Z) :- parent(X, Y), parent(Y, Z). means X is a grandparent of Z if X is a parent of Y AND Y is a parent of Z). Questions you ask the system (e