jtappero@pacbell.net
Lab Assignment: 1 - Rule Based Architecture
Wine Tasting Advisor
Wine Selecting - Algorithm
The following diagram depicts the decision making algorithm used in assisting a user to select wine based on attribute preferences such as region, varietal, color, and taste. The algorithm is simply a series of questions, prompting the user for their decision (i.e., preference). The program only asks for user input until it can procced based on the given answers and internal rules.

Based upon user input when prompted for wine preferences, the program internally generates lists, generated from the knowledgebase of wines, to be used as input to the next step or question. For example, if selecting by region or varietal, the options available are generated from the regions and varietals associated with the wines in the knowledgebase. If selecting by color and taste, the list of taste options is generated from only the attributes associated with the wines of the color selected by the user.
Sample Run 1 - Wine Selection Suggestion(s)

Description - Run 1 - Color and Taste
The "Wine Selection Suggestions" option is run by selecting option [1] from the first menu option. The program then prompts to see if you would like to select a wine based upon color, region, or varietal. In this run, option [1] was taken in order to base the selection upon wine color. Once prompted for wine color, option [1] - red was chosen. The wine color prompt is then followed by prompting the user for a preferred "taste" attribute. The list of wine attributes to select from is constrained and generated based upon the user color selection. In this example, option [2] - fruity was chosen, which then completed the program's requirements for making its recommendations for wines based on "red" color and "fruity" taste.
Sample Run 2 - Wine Selection Suggestion(s)

Description - Run 2 - By Wine Region
This time, the "Wine Selection Suggestions" option is run by selecting option [1] from the first menu, followed by taking the option to select by wine region. Once prompted for region, option [15] - Tuscany-Italy was chosen. Note: The list of available wine regions is constrained and generated based upon the knowledgebase of wines. The list also includes several "sub-regions", as indicated by the options for both "Italy" and "Tuscony - Italy". The program's requirements for making its recommendations for wines based on region is now complete, and the possible selections are displayed.
So What is the Program Doing?
The "Wine Selection Suggestion(s)" mode is basically a classification algorithm, using forward-chaining through a set of rules in order to "narrow" the problem space of wines to display as suggestions. In each case, the program only continues to prompt the user if it cannot yet make suggestions based on the user preferences. Internal to the program, backward-chaining is used to actually prompt the user whenever the program determines that it requires input from the user to help determine the next step.
Usefulness and Limitations
This option of the Wine Tasting Advisor is both simple and straight-forward, but demonstrates how a forward-chaining, rules-based application can assistance in decision making by narrowing the scope of the problem domain. A secondary benefit to users can be derived from perhaps learning more about wines than they previously knew (e.g. which wines comes from which regions of the world). In addition, the knowledgebase supporting this part of the Wine Tasting Advisor is used by the algorithms of the other wine tasting options also available in the Advisor program.
The program is obviously limited to its existing knowledgebase of wines (both its representation and its accuracy). However, by simply adding new entries to the wine "facts" knowledgebase, the program could present a broader and/or deeper knowledge of wine. A specific example, would be to expand upon the rather limited number of taste attributes that were entered while developing this program.