note
Brovnik
Apologies if i get a bit misty-eyed in the middle, this is a subject dear
to me.
<p>
My first job involved writing an expert system in VAX Pascal.
<p>
It used a list-oriented code/data structures that could be easily serialised
for fast store/load.
<p>
My main role was writing the search engine part. Initially, we
worked hard to build a 'proper' depth-first and breadth-first
search engines, but found over time that often, only one rule
could fire, or a few independent rules could fire. In these cases,
a lot of time and effort was wasted in the 'proper' search
mechanisms, and the best (=fastest) way to the result was a combined
approach which executed as many independent rules as possible at each stage.
<p>
The problem areas were the usual with these sorts of languages,
namely Input. You want to minimise the number of questions asked, but what if
you backtrack over a question already asked ? Do you ask it again,
because the context (to the user) might be different in a
different search order. The system also allowed backward-chaining
rules if that resulted (as it did sometimes) in a faster result.
<p>
P.S. The result was IMHO pretty good. It was used for designing
telephone exchanges, which had a certain number of constraints, e.g
"given that we want 100 trunk lines and 1000 subscriber lines,
how do we layout the exchange in this room ?" Constraints/Rules included
trying to make sure units with lots of interconnections were placed
close together.
<p>
Summary of key issues:
<ol>
<li>You can write a rules-based system in some surprising languages.</li>
<li>Input/Output of code/results needs careful design.</li>
<li>Handling of input of data/questions needs care.</li>
<li>The 'proper' searches are often less efficient than more intuitive
searches for many real-world operations.</li>
<li>Multiple control-schemes(search-engines) are needed for different problems.</li>
<li>Some real-world problems are best solved by rules-based systems !</li>
</ol>
Hope that provides some food for thought.
<br>--<br><A HREF="/index.pl?node_id=80482&lastnode_id=1072">Brovnik</A>
71319
71661