Mon 8 Jan 2007
Some time ago I was in a relationship and my girlfriend at the time, noting my interest in robots jokingly asked, “Which do you like better, robots or me?” I pondered the question for a moment before replying, very seriously, “I don’t know. I really like robots.” Unsurprisingly perhaps, that relationship fizzled shortly thereafter. Women are *so* fickle.
The question has been raised “how does my bot work?” I’ll let you in on the secret. My bot uses AIML, which is an XML dialect used to emulate natural language parsing. Here’s an example:
A pattern is a case insensitive string of characters intended to match a user input. A template specifies the response to the matched pattern. Here’s a more complex example:

In this example the response to “what is your name” pulls the bot name variable into the response (so it doesn’t have to be hardcoded in the AIML dataset.) As well, a new element “srai” is used. srai is a synonym which directs patterns matching the string “what are you called” to the template for “what is your name”. Nifty, eh? Don’t worry, you don’t have to write/edit AIML in notepad. There is a handy AIML editor called GaitoBot AIML editor free to download. FYI. My bot is a php implementation of an AIML parser and is called Program E.
So… Are you excited about chatting bots yet?
