Registers the first rule. Must be called before and, or, not or defuzzify.
Rule composition is sequential and order-dependent: at defuzzify
time each rule's membership is folded into a single value that is carried
to the next rule (see and). init and or start a fresh value
from the rule's own shape; and narrows it; not inverts it.
Output label, letters only (/^[a-z]+$/i), must be unique.
Fuzzifier mapping a crisp input to a membership degree 0..1.
Narrows the carried membership with min(previous, shape(value))
(the standard fuzzy-AND / T-norm). Because previous is whatever the
immediately preceding rule produced, and is order-dependent — it
composes against the prior rule in the chain, not a grouped rule set.
Output label, letters only, must be unique.
Fuzzifier mapping a crisp input to a membership degree 0..1.
Starts a fresh membership from this rule's own shape value, ignoring the value carried from previous rules (fuzzy-OR / max is applied implicitly by defuzzify picking the single highest membership across all rules).
Output label, letters only, must be unique.
Fuzzifier mapping a crisp input to a membership degree 0..1.
Evaluates every rule for value and returns the result.
Note on terminology: this performs max-membership classification, not
centroid / center-of-gravity defuzzification. It returns the label of the
rule with the highest membership (defuzzified) together with that
membership degree (fuzzified) — it does not compute a crisp output
number. On ties the earliest rule wins (strict greater-than).
Crisp input fed to every rule's shape.
Optionalas: stringOptional namespace prefix for DefuzzifyResult.boonJsInputs
keys, e.g. 'heat' yields heat.cold. Useful when merging the inputs of
several Logic instances for boon-js evaluation.
Class helping with FuzzyLogic.