Creating Intelligence

Turning Analysis into Synthesis

Now that you have spent some time analyzing chatterbots, let’s direct what you have learned toward synthesizing a new chatterbot.

Cleverbot requires sophisticated machine learning techniques and vast amounts of data to achieve its realism. However, simple manipulation of words and phrases can go a long way, as seen with Eliza. It is likely that the chatterbot you create will be more like Eliza than Cleverbot.

To begin, create a program that simply responds to user input. Then, you will want to break a sentence down into words, and respond differently according to the words that you extract.

To begin, you may wish to examine some simple examples:

  • The Scratch wiki contains a simple tutorial for creating the template for a chatterbot—Scratch Tutorial: Creating a Chat Bot.
  • Chatbot starter code is provided for your use. You are not required to use any of this code, however. This code contains routines that:
    • separate a sentence into words,
    • remove punctuation from words, and
    • use a word from the previous response to construct a new question.

Each of these will get you started, but your final product will likely reflect the personality and tone that you create. Will your chatterbot be sassy? polite? aloof? The choice is yours!