CSCI-222 Expert Systems

Joseph Tappero

jtappero@pacbell.net


Lab Assignment: 1 - Rule Based Architecture

Wine Tasting Advisor

Introduction

The "Wine Tasting Advisor" is based upon a combination of knowledgebases that provide details related to types of wines, cheeses, food, and personal wine selection favorites. The knowledgebases are then combined with rules that govern combining various aspects of the knowledge, based upon user selected attributes, that generate selections for wine tasting, cheese and wine pairing, or food and wine pairings.

The following options are supported by the current implementation:

The Wine Tasting Advisor was implemented in the Java Expert System Shell (JESS), which is closely based upon the CLIPS language syntax. IMPORTANT NOTE: Version "jess61p4" of JESS was used during development of this application. A trial version of JESS may be obtained from the Sandia National Laboratories in order to run the program. The JESS engine and Java Language are NOT supplied with this project.

Background

Information to build the supporting knowledgebases and implement the associated rules was drawn from several sources. The basic list of wines and their attributes was developed from searching the web and then extended with personal experience as well as input from several "advisors" - friends that consider themselves experts in either wine or food, or both. The wine-and-cheese and wine-and-food knowledgebases were based upon tables from various websites (e.g. wine.about.com, www.foodandwine.com), then extended with personal knowledge and favorites. The primary heuristics for pairing wines with dinner courses was based upon the book "The Wines Lover's Cookbook" by Sid Goldstein.

Other inputs and references:

Design and Sample Runs

The initial design analysis for the Wine Tasting Advisor was based on a simple question - what steps would I take to do the same task manually? This lead to breaking the problem into the four separate modes previously noted (although, arguably wine selection is a subset of wine tasting, and the pairing of wine and cheese is a subset of the pairing of wine with dinner courses).

From there, each of the Wine Advisor modes uses a separate algorithm for performing its specific task(s).

The following links provide access to descriptions of the individual algorithms and sample runs of the current Wine Tasting Advisor implementation.

Limitations and Possible Extensions

The current Wine Tasting Advisor is limited to the representation (and completeness) of its internal knowledgebase of wines, cheeses, and foods that were immediately available over the internet with minimal query effort. The algorithms that provide the "expertise" were developed based on personal experience, guidance from a few "experts", and additional guidance from various websites and books. This approach leaves the selection and constraint algorithms somewhat generalized, and therefore may not necessarily fit everyone's tastes for wine and food combinations. In addition, the knowledgebases were intentionally kept small, sufficient enough for development and testing, but not meant to be a complete and exhaustive set of wines, foods, and cheeses. Additional limitations have also been noted with each of the sample runs in the sections above.

While developing the Advisor, the following possibilities for future extensions and improvements were noted:

Usefulness

The primary usefulness of this program is provide assistance in wine tasting and food pairings to individuals that do not have such knowledge, or who desire assistance in preparing a special occasion. Since the old hard-and-fast rules regarding which wine goes with which food have evolved (it's not merely red-with-meat and white-with-fish-and-poultry any more), and there are so many types and styles of wine to select from, many people are overwhelmed when attempting to make the right choice for their occasion.

In addition, the Wine Tasting Advisor could be used to help supplement an individual's knowledge of wine by providing selections and pairings not previously considered. In this regard, the Advisor could be considered educational, rather than merely as an assistance to wine selections.

Source and Setup Instructions

To follow the sample runs and/or run other Wine Tasting Advisor examples, you must have Java JDK 1.4 or better and JESS version jess61p4 or better, installed and their respective environment variables set for them to be accessible. Then install the WineAdvisor.zip file into any directory and change your working directory to that location, then extract the contents of the archive. Once these steps have been completed, you should be able to verify Java by executing a "java -version" and verify JESS by executing "java jess.Main" from the command line. To start the WineAdvisor expert system program, type "(batch WineAdvisor.clp)" at the JESS prompt and press enter. Then simply follow the application user-interface prompts. Enjoy!