Introduction: How to Make an A.I. Part 1
Start with a computer that has Speech Recognition and also a Text-To-Speech converter.
You will need to be able to write computer programs that can access the Speech Recognition and the Text-To-Speech Converter.
Some application development tools and programming languages can be obtained for free.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Start With a Simple Design at First.
The Program you create must be able to store and retrieve text data. Text data can be stored in a database or a simple text file.
The program can retrieve the data from the database, or it can load the data from the text file into an array or a collection in memory.
The simplest A.I. system is an “Input – response” system. An input is given to the system, such as “Do you like ice cream?” and the input is used as a key to look up the appropriate response.
Step 2: Teaching Your A.I.
You will have to teach your A.I. how to respond to every possible input, or find a way to simplify the inputs. The response that I taught my computer to say for the input “Do you like Ice Cream?” is “No I do not like ice cream. I am lactose intolerant”
An array is a simple construct that exists in most programming languages. Collections exist in many programming languages. A database engine is a separate program that is running on your computer as a service, or another computer, or on a server.
If you store your “input-response data” in an array, you may have to write code to loop through all the items in your array until a match is found with the input. The program then sends the response text to the text-to-speech converter and it will speak the response.
Step 3: Storing Your Data...
Searching a large array may take some time, especially if it is searching for something at the very end of the array.
A collection may be faster, because a collection has built in searching. The input is defined as a “KEY” to the collection. The keys are stored sorted in order, and the built in searching can use this to find the response much faster.
A database engine may be fastest for retrieving data, but requires a higher level of programming skills. A database engine runs as a separate program that has many built in searching capabilities.
Database engines can be found for free on the Internet.
Step 4: Database...
The database engine waits for you to ask it a question,by sending it a message called a “Query” A Query must be written in a very particular syntax or else the database engine will not work and it will give you an error. The query syntax is defined in a language called “Structured Query Language” or SQL.
If your query has the proper syntax, the database engine will look up the response to your input in a data table.
An “Input-response” system is just the beginning for a true A.I. system. While you can teach an “Input-response” how to answer questions like “Do you like ice cream?” it cannot answer questions like “What time is it?” or “What is today’s date”.
Step 5: What Next?
It can also not answer questions for which it was never taught. To be truly intelligent, you will need to create a program that can do “natural language processing”.
“natural language processing”. can determine that two inputs may mean the same thing, and so it can return the same response. For example; “What time is it?” should return the same response as “Do you have the time?” and “Do you know the time?”
Gather your tools and build your input-response system first, and study up on “natural language processing” for your second project.