University of Washington, Bothell
CSS 482: Expert Systems
Fall 2010
Homework 3: A Genealogy System
Assigned: Wednesday, October 13, 2010
Due: Wednesday, October 20, 2010 (at midnight)

In homework 2 and your in-class exercises, you developed an expert system to infer a set of family relationships given a basic set and you began to implement a simple interface between Jess and GEDCOM genealogy files. In this homework, you will combine these two to infer common family relationships from the contents of a GEDCOM file.

I will dispense with a summary of the previous homework and the in-class exercises; you can access the former from the assignments page and the latter here. At this point, I assume you have a rule set that can take individual and family facts as specified in the homework and infer all of the relationships described in the homework. Similarly, I assume that you have a good start on a class that provides methods for use from Jess code that allows you to walk through all of the individuals in the file and access their information (name, family as spouse, family as child, etc). Now come the next steps:

  1. Complete your new Java class and verify that you can iterate through all of the individuals in a file and access their attributes.
  2. Write a Jess function (using deffunction) that iterates through the individuals and asserts individual facts, one per individual. Verify that you get one fact per individual and that those facts have the correct slot values.
  3. You could write a Jess function to assert all of the family facts, but don’t. Do give a thought to how you would implement such a function so that it creates no duplicate family facts. Instead of writing a function, write a rule that matches on its left hand side all family slot values in individual facts for which there does not exist a family fact with that name. (Note that you don’t need to use the exists conditional expression (CE); just the not CE.) Verify that all of the family facts are asserted with no duplicates.
  4. Now add in all of your family relationship rules, a little at a time if you wish. Do you run into any problems, or does it go nice and smooth?

Once you’ve got your program working, create an output file that shows that it works correctly. Include a brief report (less than one page) that answers the questions asked above. In addition, think about what the code would look like if you needed to write the functionality provided by Jess in this program from scratch using Java and comment on that. Submit your Jess code, your Java source, your output, and your brief report to our class Drop Box.