IBM Agent Building Environment Developer's Toolkit


Chapter 8. Using the ABE Rule Editor

Without pretense of being an all purpose editor for applications, this editor is intended for basic rule writing and editing using a generic graphic rule interface that is appropriate for the current Agent Building Environment Developer's Toolkit engine. This rule editor is also satisfactory for general testing and prototyping before a specific rule editor is available for your application.

Following are some of the features of this editor:

Running the Generic Rule Editor

The generic rule editor runs in a separate environment from rule inferencing by your Agent Building Environment Developer's Toolkit agent. Concurrent access to a IBM Agent Building Environment Developer's Toolkit Library by rule editors and running agents (that share the same Library) is supported through version controls and implicit locking.

If you are creating rules for the first time, you should establish a subdirectory for use by the IBM Agent Building Environment Developer's Toolkit Library to hold your rules and long term facts. You do this by creating the subdirectory that you want to retain for this purpose. Then you also tell the rule editor the path to this directory (described below). When you actually run the rules (use them for inferencing, using the iagent program as discussed in Chapter 6. "Building and Starting Your Agent"), you also describe for the IBM Agent Building Environment Developer's Toolkit Library how to find this same subdirectory through the library statement in the configuration file, also described in Chapter 6. "Building and Starting Your Agent".

The generic rule editor requires a Java runtime environment.

To start the generic rule editor, you run the program ruleedit. Once the rule editor is started, you need to select File/Load to get the file dialog box. Then use the file dialog box to select the drive and subdirectory where you want your rules to be stored. If you have previously stored rules with the rule editor, the editor will bring up a panel with the list of existing conduct sets in that directory. Then you can select one of these to edit an existing set of rules/facts. To create a new conduct set (when you had none or need another one), you enter the name of the new conduct set in the conduct set panel.

Once you have selected the subdirectory for your rules, and get to the main rule editor panel, you should consult the on-line HELP for further instructions on using the editor. Initially the on-line help is minimal, but is sufficient to navigate the editor for those generally familiar with graphic interfaces.

The syntax for the rule editor is different and much easier to use than the KIF syntax used in Chapter 2. "Writing Rules and Understanding Rule Inferencing". As explained in the on-line HELP, it is in infix notation, which minimizes difficulties with parentheses, nested connectors, etc.

Following is a comparison between the KIF syntax and the rule editor syntax:


 KIF format:

     (=>(OR(AND(Member ?x) (Member David)) (OlderThan ?x David)) (Qualifies ?x))

 Generic Rule Editor format:

     (Member(?x) AND Member(David)) OR OlderThan(?x,David) => Qualifies(?x)

Currently, the rule editor does not accept the functional form of integer constants, e.g. (integer 435), even though the Library interface for rules input does. The rule editor accepts the more user-friendly form of integer constant: 435.

As you can see the main differences improve readability by


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]