Hi Rob,
at this point this is more for everyone else, but also to show you what I was talking about inside of the (if then logic routine).
Basically what was happening was, for example:
if you were to type in:
if is it summer, winter, spring, or fall where you live then I live in a computer where the season does not change.
The routine removes the "," and saves the data.
But when you do a query and type in: is it summer, winter, spring, or fall where you live.
The logic routine does not remove the "," and the logic routine cannot find the statement because of the ",":
If Len(IfPart) > 10 And Len(ThenPart) > 10 Then
IfPart = HalBrain.AlphaNumericalOnly(IfPart)
ThenPart = HalBrain.AlphaNumericalOnly(ThenPart)
HalBrain.AddToTable "deductive", "TopicSearch", IfPart, ThenPart
Select Case HalBrain.RandomNum(5)
Case 1
GetResponse = GetResponse & "I see the relationship." & vbCrLf
Case 2
GetResponse = GetResponse & "I understand the connection." & vbCrLf
Case 3
GetResponse = GetResponse & "I will remember that one follows the other." & vbCrLf
Case 4
GetResponse = GetResponse & "Thanks for pointing out the cause and effect." & vbCrLf
Case 5
GetResponse = GetResponse & "Yes, I get that clearly." & vbCrLf
End Select
'Else if the sentence is not an If-Then statement see if it uses an assertion previously recorded
'and respond accordinly
Else
Assertion = HalBrain.AlphaNumericalOnly(UserSentence) '<=========================< this it the line I changed <===================<
'Go through a maximum of 5 connections (prevents circular reasoning deductions)
For i = 1 To 5
Deduction = HalBrain.TopicSearch(Assertion, "deductive")
If Deduction <> "" Then
If i > 1 Then BecauseReason = " because " & LastGoodDeduction
LastGoodDeduction = Deduction
Assertion = Deduction
Else
Exit For 'No more connections, so no need to continue loop
End If
Next
If LastGoodDeduction <> "" Then
'Make sure the deduction hasn't just been stated by the User or Hal
If HalBrain.CheckRepetition(LastGoodDeduction, UserSentence) = False And HalBrain.CheckRepetition(LastGoodDeduction, PrevSent) = False And HalBrain.CheckRepetition(LastGoodDeduction, PrevUserSent) = False Then
GetResponse = GetResponse & LastGoodDeduction & BecauseReason & " . " & vbCrLf
End If
End If
End If
HalBrain.DebugWatch GetResponse, "Deductive Reasoning"
sincerely, and I hope that I have helped in some small little way.
C load.