CSCI-222 Expert Systems

Joseph Tappero

jtappero@pacbell.net


Lab Assignment: 1 - Rule Based Architecture

Wine Tasting Advisor

Wine Pairings for Dinners - Algorithm

The following diagram depicts the selections and preferences algorithm used in assisting a user to determine wine-pairing options for a multi-course dinner. This part of the Wine Tasting Advisor builds upon several of the rules-based concepts learned in the previous sections of the application. This algorithm combines classification with construction (for contraints) approaches to utilization of an expert system. Basically, the user is guided through a series of options regarding the courses of their desired dinner. The program is designed to handle multiple course dinners, from 1 to 6 courses (appetizers, soup, salad, first and second entrees, and dessert).

Sample Run - Wine Pairings for Dinners

Description - Dinner Course Selections

The "Wine Pairings for Dinners" option is run by selecting option [4] from the main menu option. The program then prompts to see if you would like to start with appetizers, followed by whether or not you would like to have soup, salad, or both before the main entrees. Once these perferences have been entered, the selections for the first entree are provided, followed by the options for a second entree, if desired. These options are then followed by whether a dessert is to be served, and if so, a dessert selection is provided to chose from. In this sample run, the selections included: appetizers, a salad, the pasta in cream sause, followed by a pork entree, and capped off by a dessert selection of fruit.

Once the dinner course selections have been completed, the prompts for wine preferences are displayed, allowing you to select the preferred wine color and taste. In this case, the preference for wine color was not provided becasue the application rules determined that a white wine would be more appropriate for the first and second entrees. These wine preferences are used to help select which wines to pair with the dinner courses selected earlier. In this example, dry white wines were preferred.

Sample Run - Generated Wine Pairings

So What is the Program Doing?

The "Wine Pairings for Dinners" mode is part classification and part confioguration/construction algorithm, using forward-chaining through a set of heuristics encapsulated in rules. In each case, the program only prompts the user in relation to the previous preferences. As described in the previous sections, 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.

Once all of the desired course and wine preferences have been assembled, the program works through a series of steps that generate intermediate candidates for wine selections and course pairings. Heuristics are used here to narrow the total possible combinations (without these constraining heuristics, the program would simply generate every possible combination for every course and wine). Even with heuristics, the current program can generate quite a few pairing selections as suggestions to the user. This suggests that additional contraint heuristics would be helpful.

Usefulness and Limitations

The Wine Pairing for Dinners functionality of the Wine Tasting Advisor provides a useful tool for helping users to determine suitable combinations (pairings) of wine and food for multi-course dinners. Selections of wine are based on the user preferences applied to the knowledgebase of wines and foods. Arguably, few people actually go to this much effort when serving dinners to friends - since a lot of wine (a bottle per course) might be required. However, for a dinner party of say six or more, the total volume consumed by individuals would be much less. Pairing the appropriate type of wine with specific foods can bring out the best in both the food and the wine.

One of the greatest limitations that's immediately obvious is the comparatively small number of food entrees supported by the current program. This could be easily overcome by extending the program to provide an editable database for the user to add entrees (they would also have to establish the appropriate wines to go with the course). Another limitation of the current program is the inability to narrow the problem space even further, resulting in fewer (but better) candidate pairings - the current program tends to generate an abundance of suggested pairings. This deficiency is due to a lack of more complete contraint heuristics to take the selections to the next stage of reduction. The next level of heuristics could be accomplished by further research into wine and food pairings (which would of course require empirical methods).

Example Error

The following screen capture depicts a typical error mode of the Wine Advisor (in Wine Pairing mode), where the combinations of selections do not yield a solution.

The conditions in this error example probably wouldn't make for an joyable dinner (Asian and Spanish together), but there are other combinations that the current implementation cannot resolve also.