Hi Rob.
Here is a bit of Q&A code tweaking I wanted you to look at as some possible suggestions for Q&A and deductive response techniques, try it, if you like it then please concider the changes to be included within HAL.
I have done this type of code change in all the Q&A coding within my other brain, it seems to work quite well, I will refrain from altering the newer HAL 6.1 for now until I give it a good debugging.
'RESPOND: ENHANCED CONTENT SENTENCE ASSOCIATIONS
'If no response is found yet, try a sentence association table provided with the mainQA table.
GetResponse = HalBrain.HalFormat(GetResponse)
If (Len(GetResponse) < 4 And Len(UserSentence) > 15 And HalBrain.CountInstances(" ", UserSentence) > 2) Then
UserBrainRel = 0
'If the User's sentence is of good length then use the LongUserSent as our response trigger.
If HalUserBrain = "" And Len(UserSentence) > 15 Then HalUserBrain = HalBrain.QABrain(LongUserSent, "mainQA", UserBrainRel)
'If the User's sentence is not of good length then use the HAL's PrevSent as our response trigger.
If HalUserBrain = "" And Len(UserSentence) <= 15 Then HalUserBrain = HalBrain.QABrain(PrevSent, "mainQA", UserBrainRel)
If HalBrain.CheckRepetition(HalUserBrain, UserSentence) = True Or HalBrain.CheckRepetition(HalUserBrain, PrevSent) = True Or HalBrain.CheckRepetition(HalUserBrain, PrevUserSent) = True Then UserBrainRel = 0
If UserBrainRel + 1 > HighestRel Then
HighestRel = UserBrainRel + 1
HighestRelResponse = HalUserBrain
End If
Score = UserBrainRel + 1
Hurdle = GainControl + 1
If Score > Hurdle Then GetResponse = HalUserBrain & vbCrLf
End If
HalBrain.DebugWatch GetResponse, "MainQA"
Jerry[8D]