CSC 261 Grinnell College Fall, 2007
 
Artificial Intelligence
 

Expert Systems Lab

This lab explores elements of the TMYCIN expert system by Gordon Novak at the University of Texas. The goal is to become sufficiently familiar with this approach that we can use it to build an expert system to place incoming Grinnell students in statistics. (Later, we will tackle the same problem using a neural-network approach. We then will be able to make comparisons about these two general approaches.)

All programs and documentation used in this lab may be found in directory ~walker/261/tmycin/

Classifying Rocks

  1. Copy files tmycin.lsp, rocks.lsp, and rocks.tst to your account.

  2. Run a few sample runs, as follows:

    1. Within a terminal window, type
      
      lisp
      
    2. At the LISP prompt, load the relevant files and start a sample run:
      
      (load "tmycin.lsp")
      (load "rocks.lsp")
      (doconsult)
      
    3. Using the handouts from class, make inquiries regarding why and whynot various conclusions were or were not reached.
    4. Use the handout from class to list various rules for this simple database.
  3. Add a new rule that identifies the rock "topaz" as being yellow and having a hardness of 8 (on the nonlinear Mohs Scale used in geology).

  4. Add another new rule that identifies "quartz" as being grey and having a hardness between 6 and 8.

Reviewing TMYCIN

  1. Review the code for the TMYCIN inference engine (in tmycin.lsp). In your review, note that the get procedure retrieves property information for a variable. For example, (get parm 'rules) retrieves the property list for rules from the variable parm.

    1. Describe in an English paragraph the main steps of the doconsult procedure.
    2. LISP supports association lists in the same general way that Scheme does. Either review your notes from Scheme or use a Web search to clarify this data structure: explain what an association list is, and explain how the LISP procedure assoc works.
    3. TMYCIN stores properties of an individual context on assocation lists. Review the rules in the TMYCIN program for two values being the same. Although the details may be somewhat tricky, try to explain the circumstances under which two items could be considered the same.

Identifying Snakes in Texas

  1. Copy files snakes.lsp and snakes.tst to your account.

  2. Run the snakes rule base (snakes.lsp), again using the TMYCIN inference engine (tmycin.lsp).

    This expert system tries to determine the identify and Latin name of a snake and also whether or not the snake is poisonous.

    Describe briefly two interactions with the expert system.

  3. In several test runs, suppose your goal is to determine whether or not a snake is poisonous. Determine how little informtion you can supply and still determine if the snake is poisonous.

  4. Review the properties and structure that comprise the context of each snake object. Explain briefly:

    1. What properties are part of a context?
    2. What are the initial data parameters?
    3. How do you know what goals are being determined by the expert system?

Work to be turned in:


This document is available on the World Wide Web as

http://www.walker.cs.grinnell.edu/courses/261.fa07/expert-systems-lab.shtml

created 2 November 2007
last revised 2 November 2007
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at (walker@cs.grinnell.edu)