'Here we take this deductive script and take it to its max.
'Now we can teach Hal new forms of verbal math and teach unknowns
'in equasions as well and even teach hal scientific formulas.
'Or it can be used to teach hal conversations of deduction which
'ever you prefer.
'These scripts are smaller as you will notice than the previous
'deduction scripts so it allows greater amounts of scripts in
'a tighter area. I'm still working with the evolutionary script
'and may see some light on that soon but in the mean time enjoy
'Hals newer brain cells.
'these scripts create there own .brn files so no need for
'any downloads.
'####### DEDUCTIVE REASONING version 3.0 ##########
'RESPOND: DEDUCTIVE REASONING FOR ULTRA HAL 4.5 OR 5.0
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " THEN ", 1) > 0 Then
SentPieces = Split(UserSentence, " THEN ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
'_________________________
'DEDUCTIVE & EQUALS
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " IT EQUALS ", 1) > 0 Then
SentPieces = Split(UserSentence, " IT EQUALS ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive0.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " IT WILL EQUAL ", 1) > 0 Then
SentPieces = Split(UserSentence, " IT WILL EQUAL ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive0.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " IT WILL ALWAYS EQUAL ", 1) > 0 Then
SentPieces = Split(UserSentence, " IT WILL ALWAYS EQUAL ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive0.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " IT WOULD EQUAL ", 1) > 0 Then
SentPieces = Split(UserSentence, " IT WOULD EQUAL ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive0.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " IT SHOULD EQUAL ", 1) > 0 Then
SentPieces = Split(UserSentence, " IT SHOULD EQUAL ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive0.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " IT COULD EQUAL ", 1) > 0 Then
SentPieces = Split(UserSentence, " IT COULD EQUAL ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive0.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " IT ALWAYS EQUALS ", 1) > 0 Then
SentPieces = Split(UserSentence, " IT ALWAYS EQUALS ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive0.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
'____________________________
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " YOU WILL ALWAYS HAVE ", 1) > 0 Then
SentPieces = Split(UserSentence, " YOU WILL ALWAYS HAVE ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive1.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " YOU SHOULD HAVE ", 1) > 0 Then
SentPieces = Split(UserSentence, " YOU SHOULD HAVE ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive1.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " YOU WILL HAVE ", 1) > 0 Then
SentPieces = Split(UserSentence, " YOU WILL HAVE ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive1.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " YOU SHOULD GET ", 1) > 0 Then
SentPieces = Split(UserSentence, " YOU SHOULD GET ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive1.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " YOU WILL ALWAYS GET ", 1) > 0 Then
SentPieces = Split(UserSentence, " YOU WILL ALWAYS GET ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive1.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
If InStr(UserSentence, " IF ") > 0 And InStr(1, UserSentence, " YOU WILL GET ", 1) > 0 Then
SentPieces = Split(UserSentence, " YOU WILL GET ", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & "deductive1.brn", """" & SubPhrase & """,""" & PredPhrase & """"
GetResponse = PredPhrase & " Yes I know." & vbCrLf
End If
'__________________
'#### END OF DEDUCTIVE REASONING ######
'Copyright 2003 Gerald L.Blakley.
'these scripts are free for the using.
'customizable scripts may be available on request.
'Best of wishes and grand new discoveries.
'Jerry.