BAPper's Rule Based System

Introduction:

People often have trouble deciding what computer system would be good for them, and what would fulfill their needs. They are often railroaded into buying the system with the greater profit margin for the vendor. It would be nice if there were a system that people could consult prior to buying to help them pinpoint the system that fits their needs.

Problem Background:

There are many factors that go into the final decision on what computer system is right for a given person. The primary use of the computer is the first thing that should be considered. Price is also a major factor on what system to purchase. Many people buy more computer than what they really need to have, while others do not buy enough computer for their primary use. Some applications such as software development and graphics applications need large amounts of compute power. Other applications such as office apps and Internet browsing do not require much compute power at all.

The computer may not be used as a workstation, but as a server. The right server is very important and is very dependent upon what the server will be used for. Questions such as what the client computers will be, and how many clients the server needs to support must be answered prior to purchasing the server. Different configurations are needed for database and web servers than that of file servers. The operating system of the server is very important, too. If a shop does not employ skilled system administrators, then UNIX servers should not be used. These systems require much effort to set up and maintain. They do not make very good PC file servers either. For PC file servers, Windows NT or Novell Netware should be used. If there are a large number of PC's, then Netware would be a better choice, because NT does not scale very well. Windows NT is a much easier system to administrate.

The expertise of the primary user of the system is an important consideration, too. I feel that beginning computer users should buy Macintoshes. PC's have come a long ways in making it easier to configure, but the Macintosh is still much easier for people that do not have any clue how to configure systems. This may not be an option for those on a network where only PC's are supported. All of these factors and many more need to be put into consideration before purchasing.

What others have done:

I did not see any references to this kind of system on the Internet. It is essentially a classification problem like Mycin and Dendral. By classifying the computer systems offered by various computer manufacturers along with their different configurations, customers can narrow their choice on what system to purchase and get a better idea of what they need in a computer. R1 is similar to this system in that it classifies computer parts and has dependencies based on these parts. While R1 classifies parts and what the parts interact with for installation diagrams, this system classifies parts and how the parts and computers affect performance in specified areas.

What I Actually Did:

My implementation is a much simpler system than what it should be. I do not go down to the level of parts and how they affect system performance, I just classify whole computer systems based on a few different needs for people. I would need to go into much more analysis of how different parts affect system performance and have the ability to use heuristics to prune the space based on specified applications. Time did not allow for this.

Solution/Algorithm:

The expert system shell that I chose to use was CLIPS. This system is, in its most basic form, a forward chaining rule based system. There was an example that accompanied the system which asked a series of questions to figure out what type of creature the user is looking at. It is the classic animal classification problem. The implementation was different than how most systems written in CLIPS would probably be done. It uses rules to simulate a goal driven rule based system, effectively making it a backward chaining system. CLIPS is a programming language, not just an expert system shell. The rules implemented include rules for selecting what goal to look for based on the left hand side of if then statements. There is also a rule for asking questions of the user. This, I modified to be more robust for my needs.

The system goes through if then statements that are put into the working memory of the system. While running, it propagates goals that appear on the left hand side of the if then rules. When it finds a variable that does not exist in memory yet, and it is not on the right hand side of a rule, it looks at the questions for the variable. This is how it determines what questions to ask. The current goal changes as it looks to see if rules should fire, it maintains a stack of previous goals it was trying to find. This is put onto what is called an agenda in CLIPS. This is how it comes back to a multi-part if then statements to check the next part after an and.

I tried every possible outcome and there were no errors. The way the questions are asked, it will not allow a wrong answer to be entered into the system. My question rule is given all the possible correct answers and if the user does not use one of these, then it asks the question again.


Here is the source code for the CLIPS rules I used:
foo.clp

Here is a sample run of the system:
foo.out


Limitations:

Now that I have used a rule based system, I realize how primitive it is. It is very hard to fit the domain to a rule based system. Because the lab was to use a rule based system, I did not use the more advanced features of CLIPS. These feature complete object oriented programming capability with inheritance and polymorphism. With these features, it can allow for a better approach for modeling the domain data than just simple rules.

With just a rule based system, there was no way for me to prune my search space. Without heuristics I was unable to provide a better flow for the questions, and disregard rules that make no since once questions are answered. It was difficult to get the right question to be asked first, is this a server or a workstation. At that point, any rules pertaining to servers can be disregarded if the user answers workstation.

The program as is, is not very useful. There is no enough domain knowledge built into it to be of use. A rule based system does not map well to physical components of a computer. It would be better to have an object based system where each component has attributes that affect the overall system attributes. The components could then be looked at individually by the inference engine to come up with a more customized and accurate response.