CSD 3939 Home Page The Prior Page The Next Page
Middlesex Logo

Lab 22: Rule Based Systems

  1. Get Clips running. It's on http://clipsrules.sourceforge.net. Go to download; I got clips_windows_executables_630.zip, and extracted CLIPSIDE32.exe.
  2. Run that, and you get the clips shell.
  3. Assert some facts (assert (duck)) (facts)
  4. Make some rules. Open up a file, (defrule bob (duck) => (assert (chicken))). Load it in, run.
  5. Now make some assertions that define a hierarchy of mammals. You can do it in a variety of ways, but I used facts that looked like (ISA canine mammal).
  6. Make sure that you have some grand-children nodes, like (ISA wolf canine).
  7. Make a rule which expands the ISA relation. In my case it added the fact (ISA wolf mammal).
  8. 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).
  9. Now add a rule which exploits the ISA relations to put these facts in.
  10. 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.
  11. 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.
  12. 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.)
  13. 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?