AIML Basic Tutorial
Introduction
In this tutorial you will learn what an AIML file is.
AIML Basics
Before learning the AIML language, it is necessary to first understand what an AIML file is. An AIML file defines inputs and outputs to a chatbot so it can analyze and respond to a human being. This input/output or question/response format is the heart of AIML and chatbot programming. The basic idea is:
Let's have an example. Say there are two people - person A and person B. If person A asks person B "How are you doing?", person B might respond with "I'm fine, thanks." What this scenario describes is the interaction between a human and a chatbot. Person A is the human (asker), and person B is the chatbot (responder).
So what's happening behind the scenes such that the chatbot knows how to respond to a human? Actually, it really isn't as difficult as it sounds. A chatbot has a massive database of information that it can pull from to perform pattern maching on. This database is created from AIML files and managed (on a per-chatbot basis) as time progresses. Some chatbots will be able to keep track of information better than others, but as a general rule AIML files match inputs to outputs. Here's what's happening in our previous example:
Each time a person asks the chatbot a question, or simply makes a statement, the chatbot will attempt to match the sentence to a pre-defined pattern in order to produce a response. The more realistic the response, the better, usually. Of course, the bot's responses are completely up to the botmaster who programmed the chatbot in the first place! If the botmaster wanted to make a completely stupid chatbot, that's an option as well because chatbots are completely customizable!
If you are still interested in AIML, you should progress to the next tutorial to get an idea of how they are made.
About the Author
Grant Dryden works as a computer engineer. He writes software in C and C++ for embedded systems as well as firmware in VHDL. He has a Bachelor of Science in Computer Engineering.

