| |||||||||
bot program which attempts to maintain a conversation with a person. While it is true that a good understanding of a conversation is required to carry on a meaningful dialog, most chatterbots do not attempt this. Instead they attempt to pick up cue words or phrases from the person which will allow them to use pre-prepared or pre-calculated responses which can move the conversation on in an apparently meaningful way without requiring them to know what they are talking about. An exception to this approach is Jabberwacky which attempts to model the way humans learn new facts and language.
The classic early chatterbots are ELIZA and PARRY. More recent programs are Racter and A.L.I.C.E..
In principle a chatterbot can be a very short program. For instance the following QBASIC program -- which should be copied and saved as WikiChat.BAS -- implements a chatterbot which will learn phrases in any language by repetition in much the same way that a parrot does.
Note that to begin with, this chatterbot knows nothing and therefore says nothing. However if one uses simple conversation with it, like a parrot it will begin to reply as it starts to find responses that are appropriate for the immediately preceding sentence.
The following sessions show how to teach WikiChat some simple conversation. Note that sessions are started by running the WikiChat program and ended by pressing the return key without giving a response to the computer. They show WikiChat being taught a basic conversational pattern in English.
The responses will be stored for the next session, so that there is no need to reteach them but it should be noted that while this example chatterbot will create "original" sentences after a little teaching, it has a very limited capacity and works best with short sentences.