Archbot
A chatterbot building architecture using Visual Basic, XML, MSAgent, SAPI and Windows Scripting Host.
  Related Resources
• Past issues of weekly features
• Computers with Personality
• Baby Hal
• ArchBot SOURCE CODE
 
 Elsewhere on the Web
• Chaterbot Central
• AgentLand
• BotSpot
 
 

Archbot is an open-source chatterbot building system or "architecture" that allows the user to build voice controlled, scriptable, animated chatterbots using XML files that provide the bot's specifications. The user can type via keyboard or speak via microphone to his/her computer, and have it talk back, using an animated Agent, as well as execute scripts written in either VBScript or JScript, that perform tasks, letting the user literally control his/her PC by talking to it. The author, Greg Binning, spent 2 years building this system, and I hope you'll enjoy it as much as I do.

Bots with different brains, personalities, and even different genders can be built using this architecture. There are two versions of this project, a SAPI (speech recognition) and a Non-SAPI (keyboard typed dialog) version.

Quick Start

We are providing the project documentation in a separate TXT file available for separate download. Here is the full, documented project source code. The "ArchBot User Manual" will allow a User to get started using the application right away. Then we get into the "Project Requirements" section where we discuss the Methodology used as well as the technologies used in the project.

A small study of the English language follows this, giving the user a brief tutorial on concepts of the English language, that are essential to understanding the Natural Language Processing utilized in the project.

The "Project Application Development" section contains information for programmers wishing to learn how to build a bot architecture engine and how to expand and extend it. If you wish to learn how to build a bot and the bot's brains through the XML files, check out the section "Building a Bot".

History of Chatterbots

  • ELIZA

    During the 1960s Joseph Weizenbaum created ELIZA. ELIZA created a storm of public interest in AI, as it helped thousands overcome their personal problems. ELIZA was a psychiatrist, particularly one that posed analytical questions for every answer the user gave it. Though sometimes they may have seemed ambiguous, people actually felt ELIZA could take care of their needs just as well as any other therapist. They became emotionally involved with ELIZA, even Weizenbaum's secretary demanded to be left alone with the program. When people had started calling ELIZA intelligent, Joseph Weizenbaum went into an uproar. Technically, ELIZA was actually unable to understand people's personal problems to the depth of any other human being. ELIZA could only manipulate syntax (grammar), and check for some key words. Certainly, if someone had no knowledge of ELIZA being a program, one could easily conclude that it behaved like a human conversing, although it never really neccessary understood everything to the detail that humans do.

  • Turing Test

    In 1950, Dr. Alan Turing, a British mathematician who is now considered the "Father of AI" proposed the "Turing Test" for intelligence. Simply put, the Turing Test boils down to the question: "Can this machine convince the human to think that it's human?". Specifically, the machine is a natural language system that converses with human subjects. In the Turing Test, a human (the judge) is placed in one room, and the machine/or another human is placed in another. The judge may ask questions or answer questions posed by the computer/or another human. All communication is done through a terminal, input is done by typing. The judge is not aware whether or not the subject that he/she is talking to is either a human or a computer before the conversation begins. Supposing that the judge was conversing with a computer, during and after the conversation, he/she must be "fooled" into thinking that the machine is a human in order for the machine to pass the Turing Test. There are actually very many pitfalls to the Turing Test, and it is in fact, not very widely accepted as a test for true intelligence.

    Problems with AI

    I don't know where to begin on how technology has changed in the last half century, much less what has happened in the last decade with the developments in computers, technology and AI. Back then we didn't possess the raw computing power, much less the advances in speech recognition, text to speech, neural nets, easy string manipulation algorithms, and graphical animation. But computers have only really been around for 60 years so we wouldn't expect to much of them at first. People had plenty of high expectations as to what technology would be like in the year 2000. Some of those dreams are being realized today while many others are still far away.

    Current Technologies

  • Alice

    In the 1990's, Dr. Richard Wallace developed a chatterbot system that could be written in an XML specification called AIML, short for Artifical Intelligence Markup Language, and "Alice" was born. Today, Alice and her many derivitives, or "clones", permeate the web today as artificial site greeters, sales representatives, celebrities like Elvis, The Beatles, and as a novelty item on the movie web site for "AI - Artificial Intelligence". Alice runs similiar to Eliza, with more tricks and a bigger brain this time, and is a very popular chatterbot in the AI community today. Probably the biggest factor of success for Alice is the fact that she's open source, drawing on many resources around the world to contribute to her further success. Another big note is the fact that Alice has won the Loebner Contest, mentioned below, for two years in a row as of this writing. There are around 25000 templates in her brain, and growing. Dr. Wallace's unique one liners as responses is what gives Alice her unique personality. This project chooses to go open source for the same reasons as Alice, providing Visual Basic programmers a framework to continue to build upon and become the Microsoft Windows equivalent to the SETL environment's Alice.

  • Loebner Contest

    Today, the Loebner Contest is an instantiation, a modern version of the Turing Test. The criticisms surrounding the Loebner contest deals with how the Turing Test is carried out. The goal of the contestant is to fool or trick the judge into thinking that his program is a human. Such a prospect does not encourage the advancement of AI. For example, messages are transmitted via text, as the subject (human or computer) types, the judge sees the text that is being typed, live. Thus, many contestants have been forced to emulate typing conditions of humans, i.e. text that is outputed comes out at varied speeds, sometimes words must be misspelled and corrected, incorrect punctuation is often used etc. Even then, the programs in the contest usually talk about only one subject (to talk about everything present in our culture is simply impossible, at least for a natural language system that understands only words, syntax and semantics and not really what they look like, what some objects really do etc.). If the judge picks another subject to discuss, the programs usually try to divert the attention of the judge. Programs have even tried to use vulgarity or an element of surprise, to get the judge excited. Alice, mentioned above, has won the Loebner Contest two years in a row.

    Problems with AI today

    Although we have seen many advances in technology, especially with AI, we still do not possess software that unequivocally possesses the ability to produce conversation at a human's intelligence level. Chatterbots have utilized Markov chains, neural nets, language disambiguation parsing, as well as the more classic methods of ELIZA like Case Logic, blackboards, NLP, and part of speech tagging. Huge claims to fame from corporations of "child machines", "common sense databases", and other AI and NLP related topics have resulted in nothing really more than a research project whose funding gets cut. Nobody and nothing can purport to have a machine that actually THINKS like a human today. At any rate, we still do not possess a software that can pass the Turing Test, or display strong, genuine artificial intelligence in natural language conversation. We are however, producing better chatterbots and chatterbot systems.

    Project Description

    The intent of this project is to be able to develop chatterbots through a "bot architecture" that can provide numerous services from a Chatterbot interface. This interface will bring together the technologies of Voice Recognition, Natural Language Processing, Text to Speech, Animated Agents, and Windows Scripting Host. The interface provides for voice or keyboard input from the user and controls the MSAgent's movement, animations and speech, as well as scripted commands being executed by WSH. The script can be in any script language supported by Windows Scripting Host. The "bot architecture" will enable bot authors to build bots that have different brains, different personalities, different animated Agents, even different bot genders, through the use of various XML files. This bot architecture has been developed to ease the maintainability issue that comes with handling huge brainfiles, as well as mechanisms providing for numerous NLP tasks like the task of Symbolic Reduction. Bot authors can develop brainfiles that can be written to provide endless possibilities of randomness and variation in the bot's responses and the Agent's animation. Bot authors also have the ability to write linear conversation trees. This means giving the bot author the ability to have the bot actually carry on a conversation past one sentence. There are many possibilities of what the bot can do in terms of scripting, and bot authors can choose to script their bots in whatever scripting languages are installed on their PC, usually in most cases it's VBScript or JScript.

    Future Versions

    The project could certainly be enhanced ten fold by turning it into an ActiveX control that computes all the NLP chores and works side by side with other ActiveX controls that form a VB or C++ windows app, web page interface, or any type of interface that utilizes ActiveX technologies. The code for transition XML Document parsing could be made more efficient and fast, actually this is really all you need to do because everything else is pretty fast. Other parts could probably be modularized more, e specially the main function ChatbotResponse(). Fully extending the Bot application in the Script engine as well as adding application stuff like word processor, reminder system, Web browser and system control like Windows Shutdown, Control panel applets, and adding stories, quotes, games etc. The purpose of the bot is to provide system control as well as a chat partner.

    About the Author

    My name is Greg Binning and I have spent 2 years putting this project together in my spare time. I work for state government in Louisiana as a Systems Analyst 2, currently I'm working on a special project to build a statewide web based application and I serve as that project's Technical Manager. I have studied Artificial Intelligence for many years now and this project is one product of that study. I am as of now, finished with this project and now involved in an expanded artificial intelligence project using Visual Basic 6.0 as the choice development language. This enhanced version will be open source as well.