Artificial Intelligence Programming
The Chatbot Design
Artificial intelligence programming does NOT have to be difficult; it can be very simple, just keep in mind it is not an exact science.
So many people I have talked with seem to be under the impression that building an artificially intelligent chat bot requires an IQ over 180, a comprehensive knowledge of programming code and a dedication to research. While I cannot deny that these attributes will definitely assist a budding artificial intelligence programmer, it's really not such a gargantuan feat as most people make it out to be.
In this article, I'm going to go over some of the most basic concepts involved in building a very simple natural language processing program. These are the baby steps I went through prior to making Jeeney, if you plan to attempt building a full scale A.I. program, I would highly recommend you try steps like these first to get a feel for what you are working with. This article was NOT written to give you a step by step procedure to create a world class A.I. bot; trying to write a full guide for something of that magnitude would be the equivalent of writing up a bible. (No thanks!)
I am going to assume that you already understand the basics of how a database works.
Most A.I. chatbots, or "chatterbots" as they are often called, are generally designed with the objective to search some form of database for relative information using text patterns. Text patterns are just words commonly found grouped together for various sentences that tend to mean the same thing.
Here is an example of a potential text pattern.
Example: "What is your name?" = "your name?" = “ur name”
If "What is your name?" is the only entry in your database and a user types it in exactly like that, it will be matched easily and perfectly to whatever corresponding answer you have programmed into it. Unfortunately, this will only match the complete sentence including the question mark.
A more open approach would be to use "your name?" as this will catch sentences like "What's your name?" or "Can you tell me your name?" The downside to this approach is that it will also catch things like "Do you like your name?" and of course, you will need to counter that by turning a pattern out of "Do you like".
As long as the program searches for the best possible match and you are quick in cutting the loose ends, this technique will serve you well. To cut the chances of slip holes like that, you just use full sentences wherever possible, but that will take much more work!
With just this technique alone, you could build a fairly clever A.I. over time, but it'd take a lot of typing to do it!
Many people will argue that this is actually not artificial intelligence programming at all but rather, a very basic selection program, which is true in some context but according to Allan Turing, if you can make a computer program talk intelligently, like a person, to the point where people couldn't really tell the difference - then it is in fact, intelligent. While this technique would take a serious amount of time and effort to get there, it's still just as plausible to reach the desired result as some of the more advanced versions.
Continued... Advanced AI