Skip to content

FuzzyLite Language

Definition

# Comments start with a #
Engine: identifier
  description: text
InputVariable: identifier
  description: text
  enabled: boolean
  range: scalar scalar
  lock-range: boolean
  term: identifier Term [parameters]
OutputVariable: identifier
  description: text
  enabled: boolean
  range: scalar scalar
  lock-range: boolean
  aggregation: SNorm|none
  defuzzifier: [Defuzzifier [parameters]]|none
  default: scalar
  lock-previous: boolean
  term: identifier Term [parameters]
RuleBlock: identifier
  description: text
  enabled: boolean
  conjunction: TNorm|none
  disjunction: SNorm|none
  implication: TNorm|none
  activation: [Activation [parameters]]|none
  rule: if antecedent then consequent with weight

where:

  • boolean: is true or false
  • identifier: is a valid variable name (ie, contains only letters, numbers, and _)
  • scalar: is any real number, including inf and nan
  • text: is any one-line string of text
  • none: is the absence of value

  • Term: is the class name of the linguistic term
  • SNorm and TNorm: are the class names of the S-Norm and T-Norm, respectively
  • Defuzzifier: is the class name of the defuzzifier
  • Activation: is the class name of the activation method

  • elements in square brackets are optional

Example

# from examples/mamdani/ObstacleAvoidance.fll"  
Engine: ObstacleAvoidance
  description: An engine for obstacle avoidance
InputVariable: obstacle
  description: direction of the obstacle
  enabled: true
  range: 0.000 1.000
  lock-range: false
  term: left Ramp 1.000 0.000
  term: right Ramp 0.000 1.000
OutputVariable: mSteer
  description: steering direction of the vehicle
  enabled: true
  range: 0.000 1.000
  lock-range: false
  aggregation: Maximum
  defuzzifier: Centroid 100
  default: nan
  lock-previous: false
  term: left Ramp 1.000 0.000
  term: right Ramp 0.000 1.000
RuleBlock: mamdani
  description: Mamdani inference for steering
  enabled: true
  conjunction: none
  disjunction: none
  implication: AlgebraicProduct
  activation: General
  rule: if obstacle is left then mSteer is right
  rule: if obstacle is right then mSteer is left