Home
Open Source Works

About Expert Systems

Expert Systems differ from algorithmic programmed solutions because they are designed to be knowledge driven as opposed to data driven. That is, the decisions an Expert System makes are based on human knowledge, not just the data at hand.

In truth, Expert Systems promise a great deal, but unless very carefully implemented offer little that cannot be done with a rules engine, or ordinary conditional programming. The very good thing about Expert Systems is that they are highly configurable, and their decisions can be checked by interrogating the system after a conclusion has been reached.

Expert Systems operate in two main ways: forward chaining or backward chaining. With forward chaining, a series of attributes are set by the data at hand. From these, the rules of the Expert System are evaluated in order to infer any other attributes. These inferred values are then used to infer yet more, and so on. The process continues until no more values can be inferred. The user can then interrogate the system to find out what is known based on whatever facts were provided. Forward chaining is broadly speaking what almost any rules engine performs.

By contrast, backward chaining starts with a "goal". The system then traverses the rule set to find the most efficient way to arrive at that conclusion. If any information is not known then the system has the means to ask for it (perhaps by prompting the user). The user is free to answer, or possibly to indicate that they do not have the answer. In such cases, the system re-evaluates the best way to arrive at the desired conclusion, again asking the fewest questions to do this.

In reality, most modern Expert Systems employ a combination of forwards and backwards chaining. This generally offers the most efficient way solve whatever problem the system is designed to do. In the "goal seeking" scenario (such as in backward chaining), the hybrid forwards/backwards action means that whenever the user supplies some information, the system infers as many things as possible from it before re-evaluating the best course through the knowledge base to arrive at the desired conclusion. In general, this leads to faster problem solving, arguably with greater efficiency.

From a design perspective, Expert Systems are fairly simple. Essentially data is stored as "attributes". Attributes can be considered as "key = value" pairs, although most Expert Systems also store additional information. These attributes may be set by external systems, or by input from the user. The Expert System then has rules that act on these attributes, setting further attributes.

Actually programming an Expert System is somewhat different from traditional programming languages. In particular, the rules used have no "else" clause. They really only express "if ... then ...". Boolean constructs such as OR and AND are different too. AND is relatively straight forward, as multiple attributes can be checked by a single rule. OR constructs require multiple rules that all act the same way. Usually the visualisation of rule sets presents the biggest challenge when working with Expert Systems. Some systems come with development tool sets that help in this regard.

More Information