[Informal introduction to the modified ALICE package] AIML Tag Implemented A while ago I began tossing around the idea of creating a AIML tag and playing with it to see how useful it could be. (I mentioned it on the ALICE/AIML PC ONLINE message board if anyone wants to see the original proposal.) Since then I have found more and more applications for such a feature so I decided to add it to a version of ALICE and play with it. I have enjoyed playing with it so much that I figured someone else might have a use for it as well. If you would like to try it out I have the modified package available on The ALICE Connection web site: "http://www.geocities.com/krisdrent" As useful as I have found this concept, I am making no assertions as to whether it would be considered a "healthy" addition to the current AIML spec. If Dr. Wallace feels it would be a good addition then maybe it might show up some day in other releases. But that is not the purpose of this side project. It is just to experiment with the possibilities of the tag.... Okay, on to the point: --- OVERVIEW: What functionality does the tag offer? Just a couple of basics off the top of my head... 1. allows ALICE to prefer responses that deal with the topic currently being discussed. This creates topical conversation, yet still has the ability to move from one subject to another. 2. allows ALICE to have duplicate patterns in different contexts (topics) allowing ALICE to have different responses to the same input patterns depending on the topic. For example, "overriding" the " * " pattern for different topics. (I'll give an example with this.) 3. As always, you can still use the tag to refer to the topic in your output statements (templates). 4. As always, you can add topics on top of all your existing AIML to keep your bot's current personality. --- What does the tag look like? Where is it used? ----- Topic tags are placed around one or more categories. (Usually many.) The categories (with each respective "pattern", "that", and "template") within a set of tags would be associated with the defined topic. The name of the topic would be given by a "name" property in the beginning topic tag. Here would be the full AIML format with topic: phrase phrase --- Okay, HOW is used? ---- The concept is that a person uses the tags to set the current topic being discussed. Once the topic is set, when the user types in a statement for ALICE to find a response for, the categories defined within the tags matching the current topic will be searched first... before any of the non- topic categories, or the default categories. If there is not a matching category defined in the current topic, then any categories that are not defined in topic tags are searched. As mentioned before, you can create categories with identical phrases in different topics, each with different responses that cater to the current topic. An proof of concept example: A very useful topic entry might be the default "*" input for specific topics. If ALICE were set up on a pet store web site and a person was talking to ALICE about dogs, a useful entry might be: * //more dog categories.... Normally there would be many entries in a topic, but in this example, we simply entered the default "*". In this case, if the person said something that ALICE didn't have a specific programmed response for, she could still respond intelligently within the current topic. (Note: this is all assuming there are existing categories that might set the current topic to "DOGS") Also, though topics can only have one name, they can contain the wild characters "*" or "_" just like a pattern. Also, while sticking with the pattern criteria, only one wildcard character is allowed per name. This would allow topics like "CARING FOR DOGS" or "GROOMING DOGS" to also fall into the "_ DOGS" topic. As with patterns, the more specific topics would gain preference over the wildcarded topic. This means that if the topic is currently "GROOMING DOGS" and yet there is not a programmed response for the input in that category, then "_ DOGS" would be checked, and then next the default categories. There are more creative uses for the tag, but I have already flooded you with text. I have included a sample AIML file called "Lizards.aiml" with the zip of the modified ALICE package. It creates a couple of topics about lizards. It goes along with the pet store example, except it's for lizards. (Weird, I know, but I only get to work on this stuff around 3am.) I will also be adding some more info in a FAQ or doc that I will include on the ALICE Connection web site. Those who are interested may look there--the others will be spared from my ramblings. Anyone interested in more conversation about this may e-mail me or join in on the message board (http://www.triumphpc.com/discus/) ALICE/AIML forum. Kris Drent drent@facm-kdrent.unl.edu