CS470/570
Artificial Intelligence
Spring 2017
Project #3 Prolog Option
Due: Friday April 28th

Prolog is a logical programming based on a variant of 1st order logic. To 'program' in Prolog you create a knowledge base of facts and rules about the problem. Then you may query the knowledge base. Prolog uses a modified backchaining algorithm to search the knowledge base in an attempt to prove the query.

Free versions of Prolog are available. I would recommend the one produced by the GNU Foundation, available at http://www.gprolog.org/.

For this project you need to create a knowledge base that defines the rules of Genealogy - i.e. that 'understands' family relationships. Specifically the knowledge base should contain rules that define:

In addition, you will need to add 'basic' facts to the knowledge base: Sam is the Father of Mary, Mary is the sister of Bob, etc.

The exact syntax of the rules are up to you. For example, you may define relationships individually: father(X,Y). Or more generally: relation(X,Y,father). Your knowledge base should also include rules that encode 'definitions', e.g. father(F,C):-man(F),parent(F,C), F is a father is F is male and is a parent.

In addition to creating the knowledge base, you should, of course, test it. For example, make sure it can identify all parents, all relations of a given person, all siblings, etc.

Write-up : Write your results as a paper. Plan on ~3 pages, including sample output. The paper should include the following: