home
 
 
Rule Based Systems
 
 


The simplest form of artificial intelligence which is generally used in industry is the rule-based system, also known as the expert system. Before we discuss in detail what these are, let's take a step back and point out that there are different opinions as to what really constitutes artificial intelligence. Some people, when they use the term AI, are referring to systems which have some ability to learn. That is, the system will improve its performance over time as it gains experience in solving problems, just as a human would. Other people, when they use the term AI, are referring just to systems which are capable of exhibiting human-level performance in some very narrow area, but which are incapable of learning or expanding their expertise.

Different people are always going to disagree about what AI is, but it's this fairly simple form of AI which we want to talk about right now. A rule-based system is a way of encoding a human expert's knowledge in a fairly narrow area into an automated system. There are a couple of advantages to doing so. One is that the human expert's knowledge then becomes available to a very large range of people. Another advantage is that if you can capture the expertise of an expert in a field, then any knowledge which they might have is not lost when they retire or leave the firm.

Rule-based systems differ from standard procedural or object-oriented programs in that there is no clear order in which code executes. Instead, the knowledge of the expert is captured in a set of rules, each of which encodes a small piece of the expert's knowledge. Each rule has a left hand side and a ride hand side. The left hand side contains information about certain facts and objects which must be true in order for the rule to potentially fire (that is, execute). Any rules whose left hand sides match in this manner at a given time are placed on an agenda. One of the rules on the agenda is picked (there is no way of predicting which one), and its right hand side is executed, and then it is removed from the agenda. The agenda is then updated (generally using a special algorithm called the Rete algorithm), and a new rules is picked to execute. This continues until there are no more rules on the agenda.

A typical rule for a mortgage application might look something like this:

IF

(number-of-30-day-delinquencies > 4)
AND (number-of-30-day-delinquencies < 8)
THEN
increase mortgage rate by 1%

 

As you can see, a rule bears a close resemblance to an if-then-else statement, but unlike an if-then-else statement, it stands alone and does not fire in any predetermined order relative to other if-then-else statements.

In a way, a rule-based system might almost be thought of as being similar to a multi-threaded system in that just as one doesn't know which thread will execute next, one doesn't know which rule will execute next. However, rule-based systems are generally implemented as single-thread programs.

The advantage to this type of approach, as opposed to a procedural approach, is that if the system is designed well, then the expert's knowledge can be maintained fairly easily, just by altering whichever rules need to be altered. Indeed, many rule-based systems come along with a rules editor which allows for rules to be easily maintained by non-technical people.

Rules are generally implemented in something called a rules engine, which provides a basic framework for writing rules and then for running them in the manner described above. In the past, it used to be very difficult to actually work with a rules engine, since they tended to be technologies unto themselves and very hard to interface with the rest of the IT world. In the last couple of years, however, great strides have been made in making rules engines much more easily compatible with other technologies. Some of the more well known rules engines include:

Blaze Advisor Rules Engine http://www.blazesoft.com/
ILOG JRules http://www.ilog.com/ (Java based)
ART*Enterprise http://www.mindbox.com/
(used exclusively for mortgage vertical apps these days)
Jess http://herzberg.ca.sandia.gov/jess (free! for non-commercial applications)

 

Some books which describe rule-based systems include:

Introduction to Expert Systems SURF TO AMAZON

Expert Systems: Principles and Programming SURF TO AMAZON

 

Rule-based systems are used extensively in applications such as mortgages, credit card authorization, fraud detection, e-commerce, and personalization. Because the actions of the rule-based system tend to be hidden from view, people tend not to realize just how extensively they are used.

 

 

Next week: Neural Networks

 

 
  Home

Home: Ramalila.NET

 

 

Legals:
All copyrights are maintained by respective contributors and may not be reused without permission. Graphics and scripts may not be directly linked to. Site assets copyright © 2000 RamaLila.com and respective authors.
By using this site, you agree to relinquish all liabilities and claims financial or otherwise against RamaLila and its contributors. Visit this site at your own risk.