Lab 5: Semantic Nets
Today we're going to develop a semantic net using a rule based
system. As semantic nets are representationally efficient, we'll
use a small number of rules and facts to generate a large number
of facts. The domain will be mammals, but if you prefer you can
translate the domain to something else.
- First make some assertions that defines a hierarchy of mammals.
You can do it in a variety of ways, but I used facts that looked
like (ISA canine mammal).
- Make sure that you have some grand-children nodes, like (ISA wolf
canine).
- Make a rule which expands the ISA relation. In my case it added the
fact (ISA wolf mammal).
- Now add some feature facts. For example (feature blood mammal warm).
Only add them in the appropriate place in the hierarchy. (IE don't
also say (feature blood canine warm).
- Now add a rule which exploits the ISA relations to put these
facts in.
- If you haven't already done so, add an initial rule that puts your
basic facts in the system, reset and see what you get. You should
also save your rules into a .clp file, clear, reset, load the file,
and run and see what you get.
- Now implement overriding inheritence. For instance, by default
mammals travel by walking, but bats do not. I did this by
modifying my feature inheritence rule.
- Now add enough nodes so that it expands to over 100 facts. (I did
it with 20 facts, but I'm sure I could have used less.)
- Can you implement any other interesting rules like one that only
prints out the facts for one type animal, or prints out all
the subclasses of an animal?