jtappero@pacbell.net
Lab Assignment: 1 - Rule Based Architecture
Expert Systems - What Others Have Done
WINEX - The WINe EXpert system
WINEX is a CLIPS-based expert system program that leads the user through a series of questions related to wine and food preferences. The result is a list of candidate wines and their associated confidence factors assigned by the program. This example program is rule based, containing a knowledgebase of wine facts (name, color, body, sweetness), and heuristic rules that guide the wine recommendation steps. The rules utilize confidence factors (0 - 100) to assign wieghted values to the decision making capabilities of the program. The program is a classification-based expert system using forward-chaining as its method of control, with facts and rules as its knowledge representation. The following is an example run of the program.
CLIPS> (run)
Do you generally prefer dry, medium, or sweet wines? dry
Do you generally prefer red or white wines? white
Do you generally prefer light, medium, or full bodied wines? medium
Is the flavor of the meal delicate, average, or strong? average
Does the meal have a sauce on it? yes
Is the sauce for the meal spicy, sweet, cream, or tomato? cream
Is the main component of the meal meat, fish, or poultry? fish
SELECTED WINES
WINE CERTAINTY
-------------------------------
Geverztraminer 72%
Chardonnay 64%
Sauvignon-Blanc 40%
Soave 30%
Chablis 30%
Wine Advisor Decision Tree Example
An example of a Decision Tree used in designing a wine advisory program was found on the Internet. This website provides an excellent graphical representation of the possible decision making used by a wine advisor expert system. The website supports an "Introduction to Expert Systems" computer course from the Concordia University, in Montreal, Quebec, Canada. The class focuses on the CLIPS language but doesn't provide a code example for their wine advisor. Note: There is a hyper-link for their "Wine Advisor", but link goes to an incorrect web page. The value in this reference is the decision tree graphic as an example of one way to setup and design an expert system (another approach might be to use a flow-diagram). The decision tree graphic (or flow-diagram) could then be used to augment an interview with experts in the domain, since they may more readily understand the pictoral representation during the discussions and provide additional input or correctional information.
As a Commonly Suggested AI Project
Development of a "Wine Advisor" program, using expert system technology, appears to be a popular topic suggested by many college-level courses on aritificial intelligence. For example, the Royal Melbourne Institution of Technology presents a list of requirements for designing and implementing a wine advisor for its class on Decision Support Systems, along with suggested scenarios for testing the resulting program. To view the requirements for their wine advisor project, access the following link and scroll to the bottom of the page (project requirements).
Another college course example can be found on the Univeristy of Florida - Artificial Intelligence course
website (click here). This last reference
includes example code for a wine advisory rule base that closely resembles the code available for the WINEX program,
although it is dated much earlier and does not include knowledgebase facts for specific wines. (perhaps WINEX was
based on this
Yet another example reference is from a University of Colorado psychology website on "Judgement, Choice, and
Decision Making", that appears to be the origination of the WINEX program described above.
(their class webpage)
This next entry was found on the University of Birmingham's computer science website and presents a rule-based
implementation for yet another "wine advisor". Unfortunately, it appears to be written for an expert system shell
called POPRULEBASE. The rules appear to be similar enough to CLIPS to be able to at least read and interpret what
is going on in the pogram. As is the case with the WINEX program described above, this rule-based advisor prompts
the user through a series of questions that determine what foos you will be eating as well as your wine preferences.
Upon completion of the questioning session the program produces candidate wine selections based upon user responses
and the built-in rules that determine questions to be asked. This program appears to be classification-based, using
forward-chaining, although the program directed variations on questions may suggest backward-chaining (at least for
the question and answer sections). (example code)
And one last reference: Peter Jackson's "Introduction to Expert Systems", Chapter 11, Study Suggestions, page
220. After presenting the section on heuristic classification, Jackson's text provides the skeleton coding of
a "Wine Advisor" expert system program for the reader/student to complete. The intention of the programming
exercise is to familiarize the developer with heuristics, flow control, uncertainty, and knowledge organization.