RulesRules are traditionally the messiest part of fuzzy logic. Depending on how many fuzzy variable and sets you have, there can be MANY rules which can get real ugly, real quick. Read below to see how Spark! greatly eases rule creation and shows you just the information you want to know.
See also the Set and Fuzzy Variables "how to" pages and the tutorial. Creating RulesTo create a rule simply click on the buttons (so they are pressed DOWN) that comprise that rule. Deleting RulesTo delete a rule simply click on the sets that comprise the rule and un-click the output set. To change the output set of a rule simply click on a different set in the output variable. Deleting All RulesTo delete all rules select "Rules | Clear Rules" or click on it's
toolbar icon: Note: all the rules are also deleted if a variable is added or deleted. Moving Rule ButtonsRule buttons can be arranged any way you like. To move a rule lasso it by right mouse clicking on a non-button area and drag the lasso to encompass the buttons you wish to move. The selected buttons will be "highlighted" by appearing darker than the non-selected buttons. Release the right mouse button and click (and hold the button) on any highlighted button to move it. You can also select (and de-select) individual buttons by control-clicking on them. Seeing All The Rules That Involve Specific SetsWhen you press any set button, any rules that are contain that term are highlighted. If you have many rules and select only one term you'll see lots of rules. As you click more sets, less rules are highlighted as only the rules involving the pressed sets are shown. Seeing All The Rules Activated By The Current InputWhen debugging it is invaluable to see the rules that are being activated by
the current input to the Spark! model. If the "View | Active
Rules" menu ( Seeing Any Missing RulesWhen dealing with non-trivial systems it's easy to miss some rules. To
fine out which rules are missing select "View | Missing Rules" or
click the toolbar icon: The missing rules that are displayed can be "parsed" down by the same logic as Seeing All The Rules That Involve Certain Terms. Turning On/Off The Rules That Are Activated By The Current InputWhile seeing the rules that are activated by current inputs to the Spark!
model is a cool feature, sometimes it gets in the way - especially when creating
rules. You can turn on or off this feature via the "View | Active Rules" menu choice or by clicking on it's toolbar icon: Aligning Rule Buttons Buttons can be automatically aligned by their left side or top.
Select the buttons you wish to align (either by lassoing them or
control-clicking on them) then select either "Rules | Left Align" or
"Rules | Top Align" or their associated toolbar icons: Fitting The Rules To The Screen SizeBy selecting the "Rules | Fit To Window" menu choice or clicking on
it's toolbar icon: Adding/Removing Batches Of RulesThere are times when you want to create (or remove) a large number of rules for one output set. To quickly do this press down the rules you want involved then hold SHIFT while you press (or UNpress to remove) the output set.
|
|