How to pass the “Turing test”
Look it up: https://en.wikipedia.org/wiki/Turing_test
The Turing test is not about building a really smart A.I., it is about fooling a human.
Humans are pretty hard to fool, however a good magician can pull off many amazing tricks, right in front of your face.
You cannot have a “Turing Test” without a human evaluator.
How are Amazon, Google, Microsoft and others building their A.I. “Chatbots” ?
They are using “Deep Learning” and tons and tons and tons of textual information that they gather from their search engines, user support questions, and social media sites.
I call this “Big Text”.
I have several VB applications that I wrote which allows you to copy a bunch of text from the web (News stories, Wikipedia entries etc.) and paste it into a text box.
The application will split the “big text” into an array of sentences, and then split the sentences into arrays of words. The arrays can then be used to build tables for my A.I. system
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
“How do I make a SQL query, out of some random input?”
The simple answer is that I use a “Text Parser” that I built using Visual Basic. (VB)
If you have not seen my other articles “How to build an AI Part 1 …Part 2”, here is what I have built so far…
1. I use speech recognition (SR) software called “Dragon” to make text from spoken words.
2. The input text is examined to see if it is a command, a question, or an answer to a question that the A.I. just asked.
3. I divide up the input text into a “word array” using the “split function” in VB
4. Using three loops and a “string builder” object, I generate a list of word combinations from the input text. I keep the words in the correct order, but it may be useful to try different word orders as well.
5. I use SQL queries that search two database tables for text that matches the word combinations generated above. Any results from the database results are given several “scores” which tells the program which is the best result for the given input.
6. The two tables are different, in that one table just contains a list of random sayings, and the other table contains 2 columns named “stimulus” and “response”. In this table, the stimulus is searched, but if the program determines that this is the best match, it will use the text in “response” as the output.
Step 2: Text Parser Code
Text Parser Code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If txtInput.Text.Trim <> "" Then
Dim sWords() As String = Split(txtInput.Text.Trim, " ")
Dim iLastWord = sWords.Count - 1
Dim iFirstPntr As Integer = 0
Dim iLastPntr As Integer = iLastWord
Dim sb As New System.Text.StringBuilder
lblInCount.Text = sWords.Count
For Loop3 = iFirstPntr To iLastPntr
For Loop2 = iFirstPntr To iLastPntr
For Loop1 = iFirstPntr To iLastPntr
If sWords(Loop1) <> "" Then
sb.Append(sWords(Loop1) & " ")
If sb.ToString.Length > 0 Then
lstOutput.Items.Add(sb.ToString) ' add to output
sb.Length = 0 ' Clears it
iLastPntr -= 1 ' REMOVES LAST WORD
iLastPntr = iLastWord ' Reset to end word
iFirstPntr += 1 ' REMOVES FIRST WORD
lblOutCount.Text = lstOutput.Items.Count
More in Part 4