Class Questions for a Tutorial on Computing

Expert Systems

Goal: This laboratory exercise introduces two expert systems: a simple version of Weizenbaum's ELIZA program and the student placement program used by the Department of Mathematics and Computer Science.

ELIZA

The ELIZA program is a famous program, written by Joseph Weizenbaum at M. I. T. between 1964 and 1966, to carry on conversations with people. The following descriptions comes from pages 2-3 of Weizenbaum's classic book, "Computer Power and Human Reason," W. H. Freeman, 1976.

I composed a computer program with which one could "converse" in English. The human conversationalist partner would type his portion of the conversation on a typewriter connected to a computer, and the computer, under control of my program, would analyze the message that had so been transmitted to it, compose a response to it in English, and cause the response to be typed on the computer's typewriter.

I chose the name ELIZA for the language analysis program because, like the Eliza of Pygmalion fame, it could be taught to "speak" increasingly well. Because conversations must be about something, that is, because they must take place within some context, the program was constructed in a two-tier arrangement, the first tier consisting of the language analyzer and the second of a script. The script is a set of rules rather like those that might be given to an actor is to use them to improvise around a certain theme. Thus ELIZA could be given a script to enable it to maintain a conversation about cooking eggs or about managing a bank checking account, and so on. Each specific script thus enabled ELIZA to plan a specific conversational role.

To run ELIZA on the MathLAN computers, follow these steps:
  1. Log onto the MathLAN system, entering your user name and password.

  2. Move the mouse to the picture of a ram's head on the bottom control panel; if you hold your mouse over this icon for a few moments, the machine will supply the title "Emacs". Click the left mouse button on this icon to open the emacs editor.

  3. Move the mouse (if necessary) to the "Help" menu at the top of the page, and select "Emacs Psychiatrist". Alternatively, within the new editing window, you could type
          ESC x doctor
    
    where ESC is the escape key that appears at the upper left of the keyboard. Note that ESC appears as "M-" when you type.

  4. Type in your conversation with ELIZA. After each response you enter, hit the "return" key twice.
  5. When you are ready to finish, type
          C-x C-c
    
    This means, "hold down the 'control' key while you type the letter 'x'". Then, hold down the 'control' key while you type the letter 'c'.

  6. To log off of the MathLAN system, move the mouse arrow to the lower left corner of the control panel at the bottom of the screen, click on the "icon with horizontal stripes" with the left mouse button, and select the "log out" option. A menu will appear. Confirm you want to quit by clicking on the appropriate mouse button.

Student Placement

The Department of Mathematics and Computer Science uses an expert system to help advise students about which mathematics and computer science courses they might take first. The program was first developed in the Spring, 1993, as a student-faculty project; students Vikram Subramaniam and Ivan Sykes worked with faculty member Henry Walker. The program has been refined and expanded several times over the years to reflect new or revised courses and to reflect follow-up studies of student performance.

Input includes high school transcript information and standardized test scores; the program then suggests a first mathematics course and a first computer science course for a student. The program can be used interactively with the user entering needed data, or the program can process information received electronically from the Registrar. In this latter mode, the program can generate letters for students.

To run the student placement program on the MathLAN computers, follow these steps:

  1. Log onto the MathLAN system.
  2. Open a terminal window, by moving your mouse to the picture of a computer monitor at the bottom of the screen, and clicking with your left mouse button.

  3. Run CMU Common Lisp by typing
           lisp
    
    and pressing the "return" key.

  4. At the new prompt, type
           (load "/home/walker/placement/newstudents.lsp")
           (placement) 
    

  5. When the menu appears, use the "I" option to run the program interactively. Then, enter data for yourself or for a hypothetical student as requested.

  6. When you are done, type "Q" to quit the menu. Then at the "USER" prompt, type
           (quit)
    

  7. The expert system itself has two basic parts: Each part is written in LISP, the most common computer language for artificial intelligence. The inference engine is based on the program TMYCIN, written by Gordon Novak at the Artificial Intelligence Laboratory of the University of Texas at Austin.

  8. To view the rules, move your mouse to a terminal window and type
           more /home/walker/placement/newstudents.lsp
    
    This command displays the first screen of the rule base. Hit the space bar to view subsequent screens.
    While the programming details may be somewhat obscure, the general organization of the rule base is reasonably straightforward: A certainty factor is associated with each rule, based on a 1000 point scale. A factor of 1000 indicates great confidence with the conclusion, while 700 or 500 shows must less certainty in the result.


This document is available on the World Wide Web as
http://www.cs.grinnell.edu/~walker/courses/tutorial.fa04/labs/lab-eliza.shtml

created August 19, 1997
last revised September 6, 2004
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu