Table of Contents


Defining rules

This section contains detailed information on the syntax of fuzzy rule language statements. Rule language statements may be entered into a file using any text editor, or you may use the special fuzzy ruleset editor for the purpose.

On this page...


Tips for Writing Rules

Rule Formatting

Rule Labels

Variable References

Boolean Literals

Numeric Literals

Symbol References

Sensor/Effector References

Sensor/Effector Arguments

Fuzzy Set References

Operators

Return to top

Assertions

Assertions are simply assignment statements. Since the inference engine evaluates all assertions before evaluating any conditional rules, you can use assertions to give initial values to variables. This is not very practical and therefore not recommended; you should assign initial values through an external input buffer (and these always take precedence over any assertions).

There are two exceptions to using assertions:

  1. You may want to use assertions to test a ruleset from within the fuzzy ruleset editor; you can quickly change asserted values, re-verify the ruleset, and then re-run it, repeating the cycle quickly and easily. When you are done testing, comment-out the assertions and create an InputVariables statement.


  2. You may want to assign a variable the value of a sensor. In this case, do not pass a value through an input buffer, but let the sensor determine the initial value.

Assertion Syntax:


  <ruleLabel> : booleanVariable     = { booleanVariable | booleanLiteral | sensorName(<arg>*) }
  <ruleLabel> : numericVariable     = { numericVariable | numericLiteral | sensorName(<arg>*) }
  <ruleLabel> : symbolicVariable    = { <symbol> | sensorName(<arg>*) }
  <ruleLabel> : continuousVariable  = { numericLiteral | sensorName(<arg>*) }
  <ruleLabel> : continuousVariable Is <hedge>*  setName
    
Return to top

Conditional Rules

Conditional, or IF-THEN, rules are evaluated conditionally, based on known data. The order of evaluation is determined by the inference engine, but if your ruleset is a pure fuzzy ruleset, all rules are essentially evaluated in parallel, each rule playing a part in the solution.

Tips for Conditional Rules

Conditional Rule Syntax:


  <ruleLabel> :
    IF
                      | =  |
      booleanVariable | <> | { booleanVariable | booleanLiteral | sensorName(<arg>*) } [<[weight]>] AND
                      | != |


                      | =  |
                      | <  |      
                      | <= |
      numericVariable | >  | { numericVariable | numericLiteral | sensorName(<arg>*) } [<[weight]>] AND
                      | >= |
                      | <> |
                      | != |


                       | =  |
      symbolicVariable | <> | { <symbol> | sensorName(<arg>*) } [<[weight]>] AND
                       | != |


                         | =  |
                         | <  |
                         | <= |
      continuousVariable | >  | { numericVariable | numericLiteral | sensorName(<arg>*) } [<[weight]>] AND
                         | >= |
                         | <> |
                         | != |


      continuousVariable Is <hedge>* setName

    THEN
        ---
        |
        | booleanVariable     = { booleanVariable | booleanLiteral | effectorName(<arg>*) }
        | numericVariable     = { numericVariable | numericLiteral | effectorName(<arg>*) }
        | symbolicVariable    = { <symbol> | effectorName(<arg>*) }
        | continuousVariable  = { numericLiteral | effectorName(<arg>*) }
        | continuousVariable Is <hedge>* setName
        |
        ---
    

Return to top

Hedges

The following hedges are available for qualifying a fuzzy set in a fuzzy clause. Multiple hedges may be used in any combination, but the rule author must be fully aware of what each hedge can do to the shape of a fuzzy set.

Approximation Hedges -- useful for all bell-shaped sets
CloseTo (1.2) Narrow approximation.
About (2.0) General approximation; slightly broadens the fuzzy region
InVicinityOf (4.0) Broad approximation; produces a very wide fuzzy space.

Restriction Hedges
Above Useful for decreasing linear and sigmoidal sets and for all bell-shaped sets; do not use with increasing linear and sigmoidal sets.
Below Useful for increasing linear and sigmoidal sets and for all bell-shaped sets; do not use with decreasing linear and sigmoidal sets.

Concentration Hedges -- these hedges depress the surface of linear sets and concentrate or intensify bell-shaped sets; the candidate space is reduced; a domain element must occur farther to the right for an equivalent truth value.
Very (2.0)  
Extremely (3.0)  

Dilution Hedges -- these hedges raise the surface of linear sets and dilute bell-shaped sets; the candidate space is increased; a domain element must occur farther to the left for an equivalent truth value.
Somewhat (0.5) Complement of very.
Slightly (0.3)  

Contrast Intensification Hedge
Positively (n2) Truth values less than .5 are decreased, truth values greater than .5 are increased; complement of generally.

Contrast Diffusion Hedge
Generally (n0.5) Truth values less than .5 are increased, truth values greater than .5 are decreased; complement of positively.

Negation Hedge
Not The fuzzy region is inversed.

Return to top


Rule language table of contents.
Fuzzy editor table of contents.
Fuzzy System table of contents.

Last modified: Fri Jun 9 10:39:47 CDT 2000