KB117: Setting up Program AB for use with the Character Server
Program AB, by Richard S Wallace, is a reference implementation for AIML 2.0. An AIML engine lets a character "chat"
with a user. It takes typed text inputs and generates text responses. It works by matching
inputs to a large number of rules. Version 5.4.0 of the Character Server comes with a Program AB Adapter
that lets you run a Program AB AIML chat through an avatar.
Step 1. Installing Java
For Program AB to work, you will need to install the 32 bit JDK version of the Java Runtime Environment. Chances
are you already have the regular JRE installed on your machine, but this is not sufficient. You will need to
install the Java SE (JDK) 7 (32 bit) from http://www.oracle.com/technetwork/java/javase/downloads/index.html to get the
full server version of the JRE (32 bit). The regular version of the JRE can coexist with the JDK version on the
same machine, and the Program AB adapter will look for the JDK version.
Step 2. Installing Program AB
You can download ProgramAB from https://code.google.com/p/program-ab/
The Program AB adapter has last been tested with the following drop.
You will want to unzip this file into a
new c:\Program Files (x86)\Character Server\ProgramAB folder, i.e. a new "ProgramAB" folder beneath
your Character Server folder. Below the ProgramAB folder you should see the folders src, doc, and lib.
Step 3. Test Program AB with the Program AB Console
In the unzipped file, locate the test.bat file in the src folder and run it. You should see a sample interaction with the bot named "super".
(You may need to adjust the default path for java in the test.bat file.)
Step 4. Optional - download and install Rosie
An AIML 2.0 port of the original AIML Loebner Prize-winning ALICE intelligence has made available through Dr Wallace's work with Pandorabots.com. Known
as "Rosie", this rule set may be a great starting point for your own AI efforts. You can download a version of Rosie "unadapted" from Pandorabots'
format, which differs in the syntax of map, set, and config files from the format required by the original Program AB engine. To install it, download
rosie-for-programab.zip to the "bots" directory. The directory
"rosie" should appear as a peer directory to "super". To test Rosie directly, you will need to modify Test.bat to replace the parameter "super" with "rosie".
Step 5. Ensure the Program AB Adapter service is running
With Character Server 5.4 or higher installed, right click on My Computer, open Services, locate Media Semantics Program AB Adapter, and start the service. You may want
to set it to start automatically.
Step 6. Create your CB project
Use the "AI Chat" template under "Web App" in the New Project wizard. An AI Chat project is conceptually just like a Dynamic Speech project, except that instead of
passing the text to be spoken by the bot, you are passing the text that the user typed in. With the right parameters, the Character Server will know
to first translate the input to an output using Program AB, and then speak that output. Click on the message "Respond" in Outline view, then in the
Properties tab below, click the Build... button.
Be sure the Generate an AI response checkbox is turned on and Program AB is selected. You will also specify the name of the bot to run, be it "super", "rosie", or your own creation.