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
: istrue
orfalse
identifier
: is a valid variable name (ie, contains only letters, numbers, and_
)scalar
: is any real number, includinginf
andnan
text
: is any one-line string of textnone
: is the absence of value
Term
: is the class name of the linguistic termSNorm
andTNorm
: are the class names of the S-Norm and T-Norm, respectivelyDefuzzifier
: is the class name of the defuzzifierActivation
: 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