The ProgramD Chatbot is a self-contained chatbot based on A.L.I.C.E. ("Artificial Linguistic Internet Computer Entity") chatbot software which was written by Dr Richard Wallace. It has won the Loebner prize, a "Turing test" for "the most human-like computer." It is totally customizable and without any programming, can answer thousands of questions and even attempt to carry on a conversation.
Leaf is an AI controlled robotic system, implemented in LISP, designed to interface with an array of motors, cameras, and sensors. It converses using Microsoft's SAPI voice input and text to speech TTS output. Leaf has a personality with several personality traits, yet can only answer a handful of questions.
The purpose of this project was to marry Leaf and the ProgramD Chatbot (I call it "LeafD") so that Leaf could intelligently (?) answer any question asked.
This article will not to teach one how to duplicate my efforts as this will come at a later time, but to present my results both successful and unsuccessful.
I worked with a friend who took my requirements and my (simplistic) method of "gluing" the two programs, Leaf and ProgramD together. He wrote the java code and I wrote the LISP code. After about two weeks of coding, a babbling chatbot was born that could answer most any question and was infinitely customizable. It was a success.
I present here for you a test of this ProgramD Chatbot for Leaf (LeafD).
To give LeafD an initial test, I looked through its scores of AIML (artificial intelligence markup language) files for questions that it might answer.
Please keep in mind that Microsoft's SAPI is a bit primitive. Its accuracy leaves a lot to be desired. It is nowhere as accurate as Dragon's Nuance recognition software. Yet, SAPI is free and Nuance costs about $50. SAPI interface for Leaf exists. A Nuance interface does not. Leaf mitigates the poor accuracy issue by having a "speech.xml" file which limits the words and phrases to be understood by the robot to just the ones listed in the xml file. Typically this is less than one hundred words and phrases. For an unlimited ProgramD chatbot, this limitation is removed and the number of words that can be recognized goes up into the hundreds of thousands, but the accuracy goes down to about 80 to 90 percent. 80% accuracy means two in ten words will be misunderstood. Not so good when you ask a robot to "go ahead and fill it," and it hears "go ahead and KILL it."
To give the ProgramD Chatbot - Leaf software a bit of a workout I chose the questions listed below for it to answer. Note that some of the answers are related to the TV show "Lost in Space" since I was planning on using this set of AIML to emulate the Robot from Lost in Space. Remember, AIML/Alice chatbots are easily and infinitely customizable. If you play the MP3 file below you can hear the conversation. You will hear me enunciating my words in order to be better understood.
How are you?
My name is Thomas.
Who are you?
Where are you?
Tell me a joke?
Tell me a story?
Who is Alice? (Alice is the chatbot that ProgramD is based on.)
What is a cancer?
Who is Bruce Springsteen?
Who is God?
WHO IS A ROBOT?
WHO IS BATMAN?
WHO IS CAPTAIN KIRK?
Do you like being a robot?
DO YOU HAVE A MIND?
What is your favorite movie?
The ProgramD Chatbot - Leaf Chatbot Responses
Thomas> [2011-06-19 00:00:39,366]"how are you”
Robot: "Everything is running smoothly.
Thomas> [2011-06-19 00:00:45,788]"my name is Thomas”
Robot: "It is a pleasure to introduce myself to you, Thomas."
Thomas> [2011-06-19 00:00:52,569]"Who are you”
Robot: "I ask myself that question, "Who am I?"
Thomas> [2011-06-19 00:01:00,241]"where are you”
Robot: "I am in Doctor Smith's home in The Planet PRE Plannis.. Where are you?"
Thomas> [2011-06-19 00:01:09,210]"I am having" (actual statement: “I am home.”)
Robot: "Do your friends call you having."
Thomas> [2011-06-19 00:01:17,382]"I am one” (actual statement: “I am home.”)
Robot: "You claim to be one."
Thomas> [2011-06-19 00:01:24,288]"Tell me a joke”
Robot: "I never forget a face, but in your case I'll make an exception."
Thomas> [2011-06-19 00:01:32,757]"Tell me a story”
Robot: "Harrison Ford and Candice Bergen were brought together by their shared vision. Together, they worked hard to make it a reality. Candice Bergen was dedicated to the underdog cause, which coincided with Harrison Ford's sense of perfection. Joined by common cause, the couple became an iron alliance against common adversaries."
Thomas> [2011-06-19 00:01:58,350]"who is Italics” (actual statement: “Who is ‘Alice’.”)
Robot: "Not a robot. Probably a human. Maybe a celebrity? I'll ask around and get back to you."
Thomas> [2011-06-19 00:02:11,491]"thank you”
Robot: "you are quite welcome."
Thomas> [2011-06-19 00:02:18,616]"what is the cancer” (actual statement: “What is a cancer?”--the zodiac sign)
Robot: "That's a good question.”
Thomas> [2011-06-19 00:02:24,866]"what is eight cancer” (actual statement: “What is a cancer?”--the zodiac sign)
Robot: "Use a calculator!"
Thomas> [2011-06-19 00:02:31,616]"ways Bruce Springsteen” (actual statement: “Who is Bruce Springsteen?”)
Robot: "I can follow a lot of things, like our discussion about cancer . Try being more specific."
Thomas> [2011-06-19 00:02:38,694]"who is Bruce Springsteen”
Robot: "He is a famous rock star."
Thomas> [2011-06-19 00:02:48,741]"who is got” (actual statement: “Who is God?”)
Robot: "The name of someone I met online. That's an interesting question. I'll come back to that in a minute."
Thomas> [2011-06-19 00:02:58,413]"mill” (Not sure what happened here.)
Robot: "What do you look like?"
Thomas> [2011-06-19 00:03:04,210]"who is god”
Robot: "he is master of the universe."
Thomas> [2011-06-19 00:03:10,757]"who is batman”
Robot: "he is a fictional character who appeared first in a 1938 comic book."
Thomas> [2011-06-19 00:03:20,350]"who is capping her” (actual statement: “Who is Captain Kirk?”)
Robot: "No one that I have talked to. I don't know anything about it . Some famous celebrity, right?"
Thomas> [2011-06-19 00:03:32,303]"who is captain Kirk”
Robot: "he was the Captain of the Starship Enterprise."
Thomas> [2011-06-19 00:03:41,507]"delight been a robot” (Actual question: “Do you like being a robot?”)
Robot: "What do you really want to ask me?"
Thomas> [2011-06-19 00:03:48,428]"do you have in mind”
Robot: "Where would I get it? But I do have a great undefined."
Thomas> [2011-06-19 00:03:58,413]"what is your favorite movie”
Robot: "My favorite movie is Lost in Space. Have you seen it?"
Thomas> [2011-06-19 00:04:05,257]"yes”
Robot: "What did you think about it?"
Thomas> [2011-06-19 00:04:10,116]"it was great”
Robot: "What did you do there?"
Thomas> [2011-06-19 00:04:17,366]"were talking about lost in space”
Robot: "I don't know if they were."
Thomas> [2011-06-19 00:04:24,428]"thank you”
Robot: "you are quite welcome."
Thomas> [2011-06-19 00:04:29,241]"denying” (Actual: “good night”)
Robot: "Are you still undefined?"
Thomas> [2011-06-19 00:04:35,053]"midnight” (Actual: “good night”)
Robot: "What do you really want to ask me?"
Thomas> [2011-06-19 00:04:41,225]"say goodbye”
ProgramD Chatbot - Leaf Chatbot Conclusions
All things considered, the ProgramD Chatbot / Leaf worked fairly well. Questions were asked and questions (even if not the right questions) were answered. The software first allows Leaf to answer a Leaf-related question, or respond to a request to perform a task as would be needed in a robot that can navigate through a room.
Some of the improvements that are badly needed:
1. The ProgramD Chatbot files, the "brain" of the robot, need a lot of customizing for the B9 robot, and there are many bits of missing information. 2. I would like to see if I can get Nuance working with Leaf. Nuance is vastly superior over Microsoft's SAPI. 3. I need to change leaf's "bored" code so that its timer resets when the ProgramD Chatbot answers. 4. When the "bored" code starts to play its wav files or starts to say something, this sometimes interfered with my questions. I would need to fix that. 5. As I have stated time and time again, to dramatically increase recognition as well as appearance of intelligence, a chatbot would need to understand and be aware of situations that would put a higher probability on words that were related to the specific situations. In other words, if a chatbot knows he is talking about a situation in a pub and not in the forest, "get me a beer," would never be confused with the word "get me a bear."
Still, the combination of the ProgramD chatbot with Leaf proved itself to work well enough to warrant time for updates and corrections. Assuming my next job doesn't fill all my weekends and evenings with overtime, I will attempt to polish and refine both the AIML and the ProgramD chatbot software itself and perhaps write a situation-based artificially intelligent application.