There are a number of different types of fuzzy examples. The majority of them are source fuzzy ruleset files that can be loaded into the fuzzy ruleset editor and then used for experimentation.
Fuzzy ruleset source files have an extension of .frs. The files are human readable and can be created and changed with any text editor. ABLE provides a special text editor, called the fuzzy ruleset editor, with an integrated parser, that makes it easy to create, test, and debug source fuzzy rulesets. The fuzzy ruleset editor can be started by using the runFuzzyEditor command located in the ABLE bin directory; the editor also can be started from within the Able Agent Editor by using Tools/Fuzzy RuleSet Editor... from the menu bar.
Once the fuzzy ruleset editor is running, make note of the following menu and tool bar items:
These are the editor actions you will use to "play" with the source fuzzy rulesets.
After initially loading a fuzzy ruleset into the editor or after making any change to a ruleset, always use Verify to compile the ruleset and make it ready to run. To run the ruleset, use Run. If you wish to graphically view the fuzzy sets defined in a ruleset, use View fuzzy sets....
The following rulesets can be loaded into the editor and then viewed, changed and run from there:
Do not bother to Run the ruleset.
In addition to reading source fuzzy ruleset files, the fuzzy ruleset editor can read fuzzy XML documents. When an XML document is loaded into the fuzzy ruleset editor (using the Open XML editor action) the XML statements are converted to fuzzy rule language statements, which are more concise and easier to read. You can change the statements in the edit buffer (remember to Verify your changes) and if you want to save your changes you have the choice of saving the ruleset as a fuzzy XML document or as a fuzzy source file.
The following fuzzy XML documents can be loaded into the editor and then viewed, changed and run from there:
Note that any source rule language file may be saved as a fuzzy XML document using the ruleset editor actions Save XML and Save XML as....
Another example, SampleSensorEffector.java, is a simple Java program that makes use of a fuzzy ruleset by the same name and demonstrates
This program can be run in two ways:
If you want to experiment with the program in this way, it is recommended that you copy the Java source file and the fuzzy ruleset file to your own working directory. In the Java program, change (1) the package name and (2) the path which points to your copied fuzzy ruleset file, and then compile and run the program. You can use use ABLE's runnit command as an example to make your own runnit for your new Java program.
Note that this new program will not show up on the Able Agent Editor's tabs. You can make it do so, however, but this is documented elsewhere. Without going into explicit details here, suffice it to say that (1) you will need a manifest file that states the program is a JavaBean, (2) you must package your new Java program in a jar file, and (3) you must add the jar file's name to an entry in the able.preferences file. Furthermore, your new program, like any JavaBean, will need BeanInfo and Customizer files; these are also provided as examples. You can make your customizer as simple or as complex as you wish -- the fuzzy ruleset editor itself is actually just a JavaBean Customizer used by the Able Agent Editor, but a rather complex one!
Yet another example, Underwriting, is actually part of the ABLE tutorial and should be used in conjunction with that.