How To create a bot from scratch

Sorry in advance if the text is plenty of orthographic mistakes


I'm developing a bot in Spanish. The first strategy could be to take the ALICE's bot and translate it but I have not followed that way mainly for two reasons:

  • It can be hard, just translating the files, to provide the bot with a unique personality?
  • IMHO a language is more than just that a collection of words. There are a lot of concepts that are represented in am absolutely different way in each language so just translating does not work.
  • I like to do the thinks for my own, just starting in the ground! :-)

These are the reasons why I have decided to develop a bot from scratch. So, my main problem is to develop strategies (or patterns) for doing it. In this page I will like to share them with you, just in case somebody finds them useful!

Pattern 1 : Keyword driven

The bot reacts to some big issues (keywords): love, death, religion, family, quantum mechanics… In the first approach, it does not matter what is said about one of these subjects (that can be fine tuned later). So, it will react the same way to a sentence like "I hate my family" or "I love my family". But it will react differently according with the sentence's subject. I think that this can add a big personality to the bot. So, it will react different to "I hate my family (the user says something about the user's family and he wants to know which the bot’s opinion about that is) or "Do you hate your family?" (the user wants to know something about the bot's family). The AIML's rules for that are:

  • Determine the sentence's subject and keep it in a variable (Subject).
  • Replace certain words for its keyword (mother, father, sun, daughter … -> FAMILIY)
  • Write the keywords' rules, answering different according with the Subject's value.
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.