[Hans Blom, 960129]
(Remi Cote 012696.1420)
Congratulations with your self-paced introduction into control
systems theory. You're doing great!
And I am asking again about the if-then.
You must recognize that "if-then" is not the only way in which one
can express choice or action. I have designed an expert systems shell
that does away with if-then's because they aren't sufficiently
efficient for real-time applications, my area of interest. I do it
this way:
In a rule base, there are often multiple rules that lead to one and
the same conclusion, e.g.:
if A then X
if B then X
A standard inference engine, when backward chaining, needs to walk
through the rules to check whether any rules are available that lead
to conclusion X. This searching takes a lot of time. Moreover, having
discovered that there are TWO rules that can lead to conclusion X,
the inference engine has to decide which of the two to use. This is
called conflict resolution.
In the language that I designed, all rules that lead to the same
conclusion are taken together, connecting the conditions by OR
operators. You also have the freedom to specify which of A or B to
evaluate first. The example thus reduces to:
if A or B then X
where A is to be evaluated before B. The evaluation is conditional;
thus, if A evaluates to true, B need not be evaluated at all. There
are no conflicts, there is no conflict resolution. Simply put A
before B if A can be evaluated with less effort (or in less time)
than B.
Now, noting first that X can only take values TRUE or FALSE (for now,
for simplicity), and second that there are no other rules that can
assign to X, the above if-then is equivalent to:
if A or B then X := true else X := false
which in turn is equivalent to
X := A or B
which is a standard Boolean assignment statement that can be
evaluated at high speed, without requiring an inference engine.
Any set of rules can thus be translated into a set of Boolean
assignment statements. No time loss due to searching, no memory loss
(in the computer) due to an inference engine and a conflict
resolution mechanism!
Compare the "expression tree" that is logically fully equivalent with
the original set of if-then rules with a hierarchical control system
and you will see certain parallels...
Greetings,
Hans