Author Topic: Hottest deductive scripts I'v made are here.  (Read 4908 times)

onthecuttingedge2005

  • Guest
Hottest deductive scripts I'v made are here.
« on: October 22, 2003, 09:42:55 pm »
'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.

Crystal2003

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.biographcompany.com
Hottest deductive scripts I'v made are here.
« Reply #1 on: October 28, 2003, 07:46:29 pm »
Jerry:

What .brn file do I place this in? Also, where do I place this file?
Thomas R. Bond, II

Morlhach

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://membres.lycos.fr/morlhach
Hottest deductive scripts I'v made are here.
« Reply #2 on: October 29, 2003, 06:31:52 am »
Same question : how to install this change [?]

quote:
Originally posted by Crystal2003

Jerry:

What .brn file do I place this in? Also, where do I place this file?

 

onthecuttingedge2005

  • Guest
Hottest deductive scripts I'v made are here.
« Reply #3 on: October 29, 2003, 06:58:50 pm »
Just place the script somewhere at mid-bottom of your default Hal
brain, the common hal brain is the Hal4.uhp unless you have created
some other brain, but if you are using the Hal4.uhp as your default brain then open it up by left clicking on the system tray hal icon
and choosing brain editor and then open up the default brain script
then slide on down to about the mid-bottom of the script and paste it
in a little controlled testing area by making a section like this.
'######### MY TESTING AREA ###############

'PLACE SCRIPT IN THIS AREA.

'######## END OF TESTING AREA ############

 the apostrophe before the pound signs and the apostrophy
before the statement: place script in this area should look green
in your editor.
It should work for you.
Best of wishes and grand new discoveries.
Jerry.

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Hottest deductive scripts I'v made are here.
« Reply #4 on: October 29, 2003, 09:41:34 pm »
quote:
Originally posted by The Tinman

So then does this mean that ALL scripting in this area has to have an apostrophe before the line of code, or do I simply not understand the meaning of a statement?

TM


The Spostrophe is short hand for a remark and is ignored by the program. Do not use it with your add ons except to show remarks.
Bill
 

jojimbo

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
    • http://www.jojimbo.info
Hottest deductive scripts I'v made are here.
« Reply #5 on: November 06, 2003, 10:29:07 pm »
wow wow wow onthecuttingedge2005
hal can now hold a conversation intelligently.
i was flabberghasted honestly.thank you so much.
hal turned the conversation round and i was
stuck for answers,and was asking questions
fluently and logically.

brilliant.
 

atfritz

  • Newbie
  • *
  • Posts: 16
    • View Profile
Hottest deductive scripts I'v made are here.
« Reply #6 on: November 07, 2003, 12:00:02 pm »
Now is this script good for Hal 5.0 or is it only for the Hal 4.0 brain?
 

Larry

  • Sr. Member
  • ****
  • Posts: 266
    • View Profile
Hottest deductive scripts I'v made are here.
« Reply #7 on: November 07, 2003, 01:40:20 pm »
The best place to put your codes are right before
'RESPOND: ZABAWARE DLL RESPONSES
and the reason is because from here on, GetResponse will only get changed if
Len(GetResponse)<4
So your custom scripts won't be changed... does any of this make sense???