Perennial Project
Dr. Love Project

This lab utilizes a Structured Matcher (SM) Tool called VisualWorks to accomplish the same tasks as Lab 1 (Perennials) along with a "bonus" project called "Dr. Love." Due to the simplicity of building my Perennial classifier with VisualWorks I decided to create another Expert System to demonstrate to myself and perhaps others that I have a good understanding of how this Structured Matching Tool works. So half of this lab will closely follow what I have stated in Lab 1 and the other half I hope will help rekindle the love between you, the reader, and your significant other.

For this first lab I decided to create a program in VisualWorks that classifies perennial plants/flowers. Perennial plants are hardy plants that bloom year after year and in most areas lie dormant over the winter. In nurseries around the nation you can find a wide variety of perennials to choose from, each with specific characteristics of color, height, soil preference and light preference. With all of the varieties of perennials in the world it can be challenging to pick the right one for the right conditions. With the help of this Perennial Expert System an individual can quickly narrow down their options and have confidence that the perennial they choose will fit the planting location in need.
For this lab I used my wife, who holds a horticulture degree (my expert), and her resources (Primarily “Treasury of Gardening”(1)) for my knowledge base. The user is able to query the expert system for the appropriate perennial through four categories, which are: perennial color, soil type, sun conditions and height. These four categories, which are easily obtained by the user, are important factors that are needed to insure the user gets a desirable perennial that will survive and continue to grow.

Perennials are among the most popular plants that are found around the world in a majority of gardens. They have been found to be very long-lived, hardy and colorful. However, mixing more than one kind of perennial in a garden requires planning and numerous factors must be taken into consideration.
Creating a balanced perennial bed requires advanced planning and research. Gathering information about available colors, height of plants, shade or sun preferences and soil requirements about perennials can make the difference between a perfect garden and one not as appealing.
Designing your perennial garden in advance, narrowing down those plants that work well with each other, will save you from disappointment later. By spending a little extra time and by doing your homework before you plant your perennials, you will enjoy a beautiful workable garden for weeks on end.
The expert system which I have created is an easy tool for selecting the perfect* perennials for your garden. Using the expert system will allow you to quickly narrow down your choices so that you can design and develop a fabulous perennial garden bed.
* This expert system only gives you a simplistic first screening of a wide range of perennials. While the majority of the suggested perennials will be appropriate for your garden further research must be done. You will find that some may not be appropriate in special circumstances.

Below is my projects hierarchy:

The implementation of this project is straight forward. Since the same four questions are asked there was no need to expand out the hierarchy so that each level in the tree represented a different question or variable. As you can see there are only two levels to this project. The first level (root) represents "Perennials" in general. If you want to learn about perennials you must get past this first node or else you are wasting your time. The second level contains the perennials with their given characteristics. Each perennial contains a table matcher specifying their characteristics for each of the four questions asked (Color, Soil, Light, and Height). An example of one of the perennial's tables is given below:

Scalability:
Adding an additional perennial to this project is as easy as creating another node (leaf) and entering it's unique data.
*Note: This structured matcher would be ideal if you wanted to include it in a more general structured matcher. If I wanted to create another project that dealt with other plants, not just perennials, this project could be quickly added to it so as to represent the perennial section. All that would be required would be to make the root node of this project a node in the other.

The program starts by displaying a list of perennial color options that the system has knowledge of. It then prompts the user to choose one of the colors schemes by typing in a number value. Next the program will display a list of different soil types. The user is prompted to choose what type of soil they plan to plant their perennial in by entering a corresponding integer value. After choosing the soil type the program then prompts the user to choose the sun/light conditions that the flowerbed receives. Again, the sun/light condition can be selected by typing in the corresponding answer and pressing enter. Finally the program displays different plant heights of mature perennials for the benefit of the user. The user is able to specify their height requirements by again entering an integer value. As a result the program terminates by displaying all of the perennials that meet the users requirements; The program then gives the user the common perennial plant name so that the user can easily purchase the perennial at a local nursery.
Sample Run (Error) - Perennials

Limitations:
Benefits:


Overall I think this program was a good start of something that could become a lot better. At the moment this expert system is only partly useful for myself and pretty useless to the rest of the world. As can be seen on the Internet, expert systems like mine are a great tool and very beneficial to a countless number of people around the world. For my expert system to ever become useful, besides increasing the knowledge base, I think I would have to follow this trend and adapt it for Internet use.
As far as I have found, a Perennial Expert System on the Internet doesn’t exist. My expert system has the potential of being one of the leading resources on perennials available.

For this second lab I decided to create a fun program in VisualWorks that classifies numerous ways to be romantic. Being romantic for most of us doesn't come easy. Only after learning from others and sometimes natural instinct can we master this desired characteristic. Being romantic consists of doing so many right things at the right time and being able to express yourself in a loving way. With our natural romantic handicaps (mostly men have this problem) and busy schedules it can be difficult to think of ways to be romantic in the right situations. With the help of this Expert System an individual can quickly refine their search for a desired situation and find countless ideas and resources to "Woo" their sweetheart.
My data for my knowledge base was provided by myself, a professional romancer (at least I think so), and a popular book called "1001 Ways To Be Romantic"(2) by Gregory Godek . The user is able to query the expert system for romantic ideas for a desired situation. With the wide range of categories and countless entries the user is sure to find numerous activities/ideas that will transform their relationship into a vibrant, exciting love affair.

Romance should be a key part of a relationship. So many relationships are boring or mediocre. Not because they lack love, but because they lack romance. Romance is not simply about giving flowers, candy or kisses, but the attitude of love that motivates you to give those things. Romance involves learning what your mate finds romantic and applying those things to your relationship.
Everyone wants passion and romance in their life so what holds us back?
The expert system which I have developed is designed to help people overcome these road blocks. "Dr. Love" is designed to show you, in a comforting environment, how to create romance, appreciate your partner and even re-inspire you with ideas and activities to put passion and romance into your relationship.

Below is my projects hierarchy:

The hierarchy of this project is put together in a fairly logically way. The first level (root) contains just the basic question asking the user whether or not they even want to get advice from Dr. Love. The second level is broken down into three categories: married, not married, and general (activities that one could do whether they are married or not). For example, I as the expert on this project am taking the stand and assumption that if a user is not married that they do not need expert advice about anniversaries or sex. For this reason it seemed logical to place this division here on the second level. The third level represents different categories pertaining to their parent node. They vary between anniversaries, engagement ideas and words of love. In the fourth level you will find the different events that correspond to their different parent nodes. The fourth level varies from bubble bath ideas, to Christmas ideas, to even learning from Shakespeare. Within each of these leaf nodes (in the description) you will find the expert advice that pertains to the node.
Knowledge Representation:
"Each node in the specialist corresponds to a database variable concerning a romantic characteristic. Each node asks the user a question regarding a certain trait. Every time a question is answered a database variable is assigned a new value. The table matcher in each node looks at only one variable to decide if it should progress to the next level of the specialist. If the database variable in question has the correct value, it will progress down the same search path. Otherwise, it will prune the subordinate nodes and traverse a new path. Eventually the user will traverse all levels of one path and arrive at the correct answer."(3)
An example table of a node in this project looks like the following:

Scalability:
Adding additional advice to each of these nodes is as easy as typing them in. However, if you wanted to extend any part of this hierarchy, certain variables in the database would have to be modified and additional subordinates would have to be created.


Limitations:
Benefits:


Overall I think this program has a lot of potential of success if it was part of a bigger structured matcher. Even though it is fun to go through most of the categories in "Dr. Love" and get ideas I have a hard time imagining that someone would go through the trouble of starting this program up just to get a romantic idea for some event. I think if this program was part of a bigger more general expert system, an expert system that branched out in other areas like interrelationship communication for example, then the program as a whole would be more successful.
Also, as with most expert systems, making the program accessible from the world wide web would help make the program more useful. As for right now this program is only useful to myself, the creator, and a few others.
Overall, this fun program is a big success and demonstrates some of the many features and benefits VisualWorks or SmallTalk has to offer. I'm sure this project has the potential of helping many people in their relationships and being one of the top experts in this area for generations to come.
Footnote: (1)“Treasury of Gardening” published by Publications International, LTD. [1994] (2) Published by the Casablanca Press Division of Sourcebooks, Inc., Naperville, Illinois. (2000) (3) This paragraph was taken out of a fellow students project and modified. He said it better than I could. See "Expert Systems Lab2" by John Monson.
Developed by Andrew Tree
California State University, Chico
Computer Science 222, Expert Systems and Applications