Bots in Wonderland
Bots in Wonderland
Dateline: 06/27/00
There are so many experiments with advanced Natural Language Understanding technology that it becomes difficult to track the progress in this field. Various commercial chatterbots seem destined for work as a customer service representative on the Web. These packages generally offer more-or-less user-friendly development environments and easily understood scripting languages, including customizable animated characters or avatars that make your chatterbot more "emotionally intelligent" and "believable". Talking of believability, each bot has a chance to prove its potentials during annual Loebner Contests. Alan Turing predicted in 1950 that in about fifty years "an average interrogator will not have more than a 70% chance of making the right identification after five minutes of questioning" in an imitation game. A number of judges gathers each year to independently test several computer programs and real persons, without previously knowing who are they talking to - the actual conversation goes through a computer terminal. ALICE is an open source natural language chat robot that won this year's Loebner Prize back in January. She was rated the "most human computer" by a panel of judges including linguists, philosophers and psychologists. So now we have a free product that is certified as better than many of its commercial counterparts. Be aware that no computer was mistaken for a human in Loebner Contests so far, and dialogues like the following one are still possible:
Judge: WHAT IS THE COLOR OF A BLUE TRUCK
Program: WHAT COLOR IS a blue truck
Judge: WHERE IS SUE'S NOSE WHEN SUE IS IN HER HOUSE
Program: Where it belongs. Try searching the open directory.
Judge: WHAT HAPPENS TO AN ICE CUBE IN A HOT DRINK
Program: Try it.
Judge: ALTOGETHER HOW MANY FEET DO FOUR CATS HAVE
Program: Do you have any idea what I am talking about?
Taken from the conversation logs from Loebner 2000 Contest, http://www.dartmouth.edu/~phil/events/Logs/Alice_Log.html
As it can be seen, there is a plenty of room for further improvements in this field. The art of making successful chat robots is perfected by Dr. Richard S. Wallace for more than 5 years. The earliest version of ALICE, first activated on November 23, 1995, was implemented in the SETL language, based on set theory and mathematical logic. Although the SETL source code was freely available, just a few outside contributors took interest in ALICE until she migrated to the platform-independent Java language in the summer of 1998. Available under the GNU General Public License, program B initiated a storm of development activity by hundreds of contributors around the world. Most recently new threads of C/C++ development have led to "program C", actually a collection of C/C++ programs and applications including Cgi-ALICE, IRC-ALICE and WinALICE. Program B is very stable and has several quite advanced text-analysis tools, but is more processor- and memory-intensive. Program C can thus be used as CGI script on older and less powerful machines, while WinALICE features advanced GUI and will be used with other speech recognition and generations tools, and animated interface agents.
Apart from the availability of source code and number of people contributing to the project, there is another feature that distinguishes ALICE from the rest of the crowd: AIML (Artificial Intelligence Markup Language), an XML specification
for programming chat robots with an emphasis on minimalism and simplicity. The
pattern matching language is very simple - the following example creates a complete chat robot in AIML:
<alice>
<category>
<pattern>*</pattern>
<template> Hello! </template>
</category>
</alice>
Every ALICE robot is contained inside the <alice> </alice> tags, while <category> tags indicates an AIML category, the basic unit of chat robot knowledge. The pattern in this case is the wild-card symbol '*' that matches any input, while template section contains the answer that is written on the output when pattern "fires". The AIML mini reference will help you understand the basics of AIML coding very quickly.
If you take a look at the program's source code, you'll see that it is pretty easy to follow its logic. The main differences between ALICE and older bots are the much larger "case base" and the tools for creating new content by dialog analysis. The program stores client dialogues in a file called "dialog.txt". After you collect some dialogue, run "Classify" and "Quick Targets". This will tell you the most frequently asked patterns that do not already have specific responses. The "Target" functions display new categories with proposed patterns and template fields filled with the name of another category. This way you can improve the usefulness of your chat robot without spending too much time on the manual analysis of log files.
For more information you should definitely read the "Don't Read Me" - original ALICE and AIML documentation written by the author. Home site also lists dozens of related links, so go ahead and see what's going on in the ALICE's wonderland.