Jonathan Fox

Expert Systems: Project 1

Computer Component Rules System

 

Source Code

 

Introduction

 

To many people what is under the case of a computer is as foreign as what is under the hood of a car.  This system will allow users to select the basic components of a personal computer.

 

Background

 

The following computer components make up the output of the program:

CPU

Motherboard

Hard drive

Graphics card

Memory

Networking equipment

 

The expertise for the system comes from myself.  I have built my own personal machine, so I have had to go through the process of selecting components.  Other expertise was found at the websites listed below. Computerhq actually has a system set up to build your own computer.  My system is more general in that specific components are not included. 

 

References

 

www.tomshardware.com

www.aceshardware.com

www.anandtech.com

www.linux.org

www.pricewatch.com

www.computerhq.com

 

My System

 

The component selector guides users through the process of selecting computer components.  There are two different types of computers that this program will configure, either budget computers or general-purpose computers.  Budget computers have more restrictions on the components that can go in them.  The knowledge for the system is set up to prevent backtracking.  When a user selects a component they are stuck with it.  The rules were also written to prevent them from running more than once.  Forward chaining has been forced onto the system.  One of the problems I had while developing was having rules firing multiple times.  I had to add conditions to the rules to keep that from happening.  After I finished I found out there is a way to prevent clips from firing rules more than once, but I found that out to late.  

 

The rules are  broken into three different sections in the program.  The first section is made up of CPU, OS, and network connection rules.  The second section is made up of RAM, motherboard, hard drive, and power supply rules.   The final section deals with printing the results.  I did this to make the rules more manageable.  Also some components need to have information about other components to select them.  For example to select RAM the CPU type must be known. 

 

Walk Through

 

 

 

Limitations

 

There is no error checking in the program.  If improper values are entered the system will either give incorrect outputs or return to the prompt.  For example if the system ask for the clock speed of for the processor and a 5 is entered the program will still finish.  The results that are printed out will be wrong.

It would be hard to buy a modern cpu running at 5MHz. 

 

Rightness

 

It works.  A computer can be specified with this tool.  Rules seem like a decent way to make an expert system to build a computer.

 

Future Enhancements

 

If I had more time I would have linked the general specification to actual hardware.  Also I would have liked to link components to prices.  Then the user could enter a price range and the system could make sure the selected components stayed within that range.  The prices for the components would be in a database that would be updated from the pricewatch website.  Of course I would add an error handler, also.