Group Page

Echo Bots

Mirror Chess

Home Page

Echo Bots - A minimalist approach to AI

Everyone seems to be writing Chat Bots nowadays - but is this really AI?

Artificial Intelligence

In general, we recognise behaviour that is predictable to a degree, while at the same time to a degree unpredictable, as intelligent or purposeful. Behaviour that is too predictable is seen as mindless and mechanical while very unpredictable behaviour is seen as random and without purpose. More specifically, intelligence may be defined as the ability to learn, where learning is a modification in behaviour as a result of experience. With these definitions, artificial intelligence (AI) is a branch of computer science that studies how to endow computers with capabilities of human intelligence [1]. Some problems in AI such as programming computers to play chess have been solved, while others such as language translation have proved to be more difficult. However, human beings have a predisposition to ascribe intelligence to non-human entities and for this reason computer programs can easily simulate some aspects of intelligent human behaviour.

Chat Bots

Conversational systems, also known as chatterbots or Chat Bots, owe much to the well-known Turing test or imitation game in which a computer program is designed to convince a human being that the program is actually another human being. Usually, a conversation is held via typed text using the computer screen and keyboard. The success of a conversational system is judged by how natural the conversation appears to be to the user, rather than by success in convincing the user that the program is a human being. Most Chat Bots generate responses by performing some kind of analysis of user responses and this was the approach taken in the famous Eliza program created by Joseph Weizembaum [2]. Although this approach has had some success, convincing simulation of human conversation remains an unsolved problem in AI.

An alternative approach, that might be termed an Echo Bot, consists of storing user responses and repeating them back to the user (or to some other user) at a future time as program responses as shown in Figure 1.

image

Figure 1. Block diagram of Echo Bot operation

The Echo Bot is interesting because it is relatively successful at simulating human conversation despite its great simplicity compared to analysis of user responses and because it demonstrates that a very simple computer program can nevertheless satisfy the definition of intelligence given earlier. The design philosophy behind the Echo Bot is that the most convincing program response is an actual response from a human being and that the most convenient source of human responses is the human being conversing with the program. What seems to happen with this technique is that a simple model of the users behaviour (a virtual personality) is created in the computers memory and the user responds to this in many respects as if it were a real person. The illusion can be quite convincing, creating the sensation of somebody inside the machine perhaps even possessing a sense of humour.

I wrote an Echo Bot program around 1985 that produced surprisingly successful results when tested with a group of college students. I later refined this into a web-based program called CHAT and this program won the Chatterbot Challenge Bronze Medal for Best Learning Bot in 2004 [3]. A conversation log from Chat is shown in Listing 1.

Listing 1. Conversation log from Chat

Chat: Hello! What shall we talk about?
User: I like to talk about the weather
Chat: If you like!
User: it is nice and sunny today here
Chat: What do you mean?
User: the sun is shining and there are few clouds
Chat: If you say so!
User: I can see out of the window
Chat: Why do you say that?
User: I have a window in my office
Chat: Are you sure about that?
User: yes I can see it from here
Chat: Why is that?
User: my desk is near the window
Chat: I like to talk about the weather
User: what is the weather like where you are?
Chat: it is nice and sunny today here
User: that is good
Chat: the sun is shining and there are few clouds
User: I hope it stays nice for you
Chat: I see!
User: what do you see?
Chat: I can see out of the window
User: what can you see out of the window?
Chat: Very interesting!
User: but what is it?
Chat: I have a window in my office
User: but what can you see out of the window?
Chat: yes I can see it from here
User: I will lose interest if you don't tell me what you see pretty soon!
Chat: what is the weather like where you are?
User: I already told you
Chat: Why is that?
User: because we were discussing the weather
Chat: I hope it stays nice for you
User: Thanks. Are you going to tell me what you can see?
Chat: what do you see?
User: I see a car park
Chat: but what is it?
User: it's a place where they park cars
Chat: I agree!
User: what do you see?
Chat: I will lose interest if you don't tell me what you see pretty soon!
User: that's what I was thinking too
Chat: I already told you
User: no you didn't !!
Chat: What do you mean?
User: you didn't tell me what you can see from your window
Chat: Thanks. Are you going to tell me what you can see?
User: I already did ...
Chat: what can you see out of the window?
User: a car park
Chat: it's a place where they park cars
User: very good

A particular feature of Echo Bots is their ability to chat in any language. CHAT can initiate conversations in English, French, German, Italian, Portuguese, Spanish and Dutch [4].

Introducing - Tiny Bot!

The BASIC program in listing 1 is a minimalist but functional Chat Bot probably the worlds smallest, being just five lines of code. This Echo Bot program prints a line of text on the screen and then inputs a line of text from the user, before repeating the procedure in a continuous loop. Some user responses are stored and repeated back to the user at some future time, in a random manner. Storage is provided for up to ten user responses in this example.

Listing 2. Tiny Chat Bot

dim a$(10)
do
print a$(rnd(10))
input a$(rnd(10))
loop

During an initial learning period, Tiny Bot prints only blank lines in response to the user but eventually the blank lines are replaced by previous user responses. In a more sophisticated version of the program, some preset responses can be stored in the array at initialisation so that these are printed during the learning period. The behaviour of Tiny Bot is predictable to an extent in the way that it tracks the topic of conversation, but this behaviour is at the same time unpredictable, because which responses are stored and when they are reproduced is chosen at random. The behaviour of the program (responses produced) is modified as a result of experience (responses from the user) and so, by the definitions given earlier, Tiny Bot exhibits learning and can be regarded as intelligent, to some degree.

Conclusion

Attempts to endow computers with capabilities of human intelligence have had some limited success in the case of conversational systems. A simple Echo Bot that exhibits learning can simulate human conversation with a surprising degree of success, however this may be due in part to the predisposition of human beings to attribute intelligence to non-human entities. The language independence of Echo Bots is probably their most important feature from the point of view of potential applications. The performance of more complex Bots that perform analysis of user responses is improving but should be compared with the performance of the simple Echo Bot as a baseline to determine how much additional value is being added for the increased program complexity.

References

[1] UKorbit Computer Glossary

[2] The Simon Laven Page

[3] The Chatterbox Challenge

[4] Woomerang Chat Page

About the Author

Jeremy Gardiner is a physicist who has been working in software engineering for 20 years. He loses against chess machines in his spare time.

Contact the author: jeremy@woomerang.com

Copyright © 2005 J. C. Gardiner. All rights reserved.