Last Update: 7 April 2003
Note: or material is highlighted |
For this project, you will define an ontology for genealogy: children, siblings, parents, grandparents, cousins, etc., and, given a knowledge base containing facts that can be expressed using this ontology, you will answer questions about the knowledge base. (This project is adapted from Russell & Norvig.)
You may do this project either in SNePS or else in FOL. If you choose SNePS, you must use the computer and our SNePS implementation, turning in a demo file. If you choose FOL, you may do the project just using "paper and pencil" (well, actually just using a word-processor!). However, there are a couple of implementations of FOL theorem-provers that you could use if you wish, and there's even a different version of SNePS that you could use! (See below.)
Write formal definitions of these predicates in your chosen KR language. Be sure to give the syntax and semantics of all non-logical expressions (primarily terms and predicates).
Here's an example: "Your sibling is your brother or sister" can be represented in FOL as follows:
(I.e., for all x and for all y: x and y are siblings iff, for all z: z is a parent of x iff z is a parent of y.)
Syntax | Semantics |
---|---|
Sibling(x,y) | x and y are siblings |
Parent(x,y) | x is a parent of y |
It can be represented in SNePS as follows:
(assert forall ($x $y) thresh 1 arg (build rel Sibling object (*x *y)) arg (build forall $z thresh 1 arg (build rel Parent object1 *z object2 *x) arg (build rel Parent object1 *z object2 *y)))
(Note: For the syntax and semantics of the "thresh" relation in SNePS, see the SNePS User Manual.
(You would, of course, also need to provide the syntax and semantics of any new case frames that you introduce.)
And it can be represented in SNePSLOG (see below) as follows:
all(x,y)(Sibling({x,y}) <=> all(z)(Parent(z,x) <=> Parent(z,y)))
(Here, you could use the same kind of syntax and semantics as for FOL, since there are no (usable) case frames in SNePSLOG!)
Now, here are the informal definitions that you must represent in your chosen KR language:
Here are some other hints: You might find it useful to decide which relations are "primitive" (i.e., which ones are "given" and cannot be defined in terms of any others) and then define the rest in terms of these (otherwise, you'll risk having circular definitions). Here is a suggested set of primitives (you may need others):
[[Female(x)]] = x is female
[[Male(x)]] = x is male
[[Child(x,y)]] = x is a child of y
[[Parent(x,y)]] = x is a parent of y
[[Spouse(x,y)]] = x and y are spouses (i.e.,
x and y are married to each other)
Here is the syntax and semantics for understanding this tree:
Now, represent the basic facts depicted in this family tree in your chosen KR language.
(a) If you are working in SNePS or SNePSLOG, input all the wffs you have represented, and let SNIP answer these questions.
(b) If you are working in FOL, use Resolution (together with the clause-form algorithm, the refutation strategy, and the unification algorithm) to answer these questions.
Finally, for those of you using SNePS, you might want to consider using instead SNePSLOG: a logic-oriented version of SNePS, which has its own "tell/ask" interface. Briefly, in SNePSLOG, you enter information in a variety of FOL, but use SNIP to handle inference! To run SNePSLOG, just type (snepslog) instead of (sneps) at the Lisp prompt after loading SNePS. For more information on SNePSLOG, see the SNePS [2.5] User Manual, especially the sections on SNePSLOG and on "The Tell-Ask Interface".
Hint: You might find it easier to try to define the predicate "MthCousin", where [[MthCousin(m,x,y)]] = x and y are mth cousins. And you might find it fun to try to define it recursively! Hint: We don't talk about "0th cousins", but we do have more familiar expressions for that relation; what are they? Then you could try to define the predicate "MthCousinNtimesRemoved", where [[MthCousinNtimesRemoved(m,n,x,y)]] = x and y are mth cousins, n times removed. Define this recursively, too, in terms of "MthCousin". Hint: What might "0th cousins, once removed" be?
As usual, you should turn in a conference-paper-style report (or a report in the style of a section of Brachman & Levesque) discussing what you did, giving the full syntax and semantics of your representations, and providing annotated demos and commented code. Any software you use that you did not write should be fully and correctly cited.
This project is optional in the following sense: You do not have to do it. If, however, you choose to do it, then I will compute your overall project grade by dropping the lowest of the 3 project grades and averaging the remaining 2. If this does not improve your overall project grade (e.g., because your grade on this optional project is lower than your other two project grades), then I will raise that average to the next highest letter grade (e.g., B+ would become A-). So, you can't lose by doing this project. However, only a complete Project 3 is eligible for this treatment; incomplete projects will not be considered.
DUE AT START OF LECTURE, MON., APR. 28 |
---|