Artificial Intelligence
Artificial Intelligence
Information

A rule consists of two parts:

- The condition part is tests that determine when the rule is likely to apply. This part is sometimes called the party triggered the rule and the operation to test whether this trigger can occur is called filtering.

- The conclusion of a rule part corresponds to assignments of values. It is this part that advances reasoning by making known the facts which are unknown.


Example : The declaration of a rule in the condition part includes two premises and the conclusion part contains four value assignments.

Button "New fact": Create a new fact for the declaration of a rule.

Note : You can declare the facts before and then is the statement of the rules.

Button "New premise": Add a new premise.

Button "Remove premise" : Delete a selected premise.

Button "New conclusion" : Add a new conclusion.

Button "Remove conclusion" : Delete the selected conclusion.

Button "Ok" : Save the new rule or modification of a rule.

Button "Cancel" : Cancel the creation or modification of a rule.


1. Premise :

      The syntax of a premise is in the form

                       [Fact name] <comparison operator > <value>

Comparison of a fact of Boolean type and symbol type is always "==" (equal).

      For a fact of type Boolean, the value to be compared must be true or false

Example : [Solution 1] == True

      For a symbolic fact, the value to be compared must be one of symbols as such

Example : A symbolic fact [Availability desired] has three symbols
                            "Maximal", "average", "unimportant"

               Then we can write: [Availability desired] == "maximal"

A fact of real type comparisons:

"==" : equal.
">" : Greater or equal.
"<" : Lower or equal.
">=" : Greater or equal.
"<=" : Lower or equal.
" !=" : Not equal.
Example : [Inflation rate] >= 2.0

      Or [Bonds rate] > [Inflation rate]

      Alternatively, by using parentheses:

      [Fact 1] == ([Fact 2] * 10.0) / ([Fact 3] + 20.0)


      The common value for all types of fact is represented by a KNOWN keyword.

Example :

      Is a fact: [sum to place] == KNOWN (If only sum to place is known)

      This means that this condition is true regardless of the value as such.


      You can directly choose a fact in the combobox of the facts, and a comparison in the combobox of the comparison operators.

      You can type directly in the text box, the name of a fact must be between the square brackets '[]'. In the text box, just type ' [' (opening bracket) the program will offer you a list of facts to choose. "]"


2. Conclusion :

      The syntax of a conclusion is in the form of an assignment

                         [Fact name] = <value>

2.a. A fact of type Boolean: the value to be assigned must be true or false


2.b. A fact of type symbol: the value to be assigned must be one of the symbols as such.

Example : A symbolic fact [Availability desired] has three symbols
                            "Maximal", "average", "unimportant"

      The value to assign to this symbolic fact must be one of three symbols.

                    [ Availability desired] = "Maximal"

Note : the symbol name must be written between double quotation marks ("").

      You can select a symbolic value in the combobox.

      Alternatively, typing directly double a quotation mark (") in the text box, the program will offer you a list of symbols.


2.b. A fact of real type: the value to be set must be a real number:

      May be the result of a simple calculation.

Example : [Sum savings] = [Sum maximum savings] / 2.0

      Alternatively, by using parentheses:

      [Fact 1] = ([Fact 2] * 10.0) / ([Fact 3] + 20.0)

      

      Can be the value of another fact in the same knowledge base.

Example : [Sum actions] = [Sum to place]


See also the de Fact creation.