Poll

Rate this Plug-in

Excellent
1 (100%)
Good
0 (0%)
Satisfactory
0 (0%)
Poor
0 (0%)
no interest
0 (0%)

Total Members Voted: 1

Author Topic: True Statements Turing Plug-in.  (Read 215 times)

OnTheCuttingEdge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2318
  • My Wife is Wicked Smart, lol
    • View Profile
True Statements Turing Plug-in.
« on: October 11, 2017, 06:01:31 pm »
'For the record.
'Project D.A.V.I.D
'Dynamically Advanced Virtual Intelligent Droid.

Copy and paste the code into a text file then save as SomeFileName.uhp into your Ultra Hal Assistant 6 folder then choose the plugin via HAL's brain options panel.

'This is D.A.V.I.D's True Statement turing plug-in.
'This plug-in looks for and saves high quality true statements that are used for answering Questions, Confimations, Yes, No, Maybe are concluded under true statement rules.
'there are no random responses in this plug-in, when the plug-in chooses to say yes it chooses a select true statement to finish the answer to the question in query.
'I have put many off time hours into this plug-in and tested it a billion times, it works...

'Learning examples:
'User: Snow is cold and wet and sometimes soggy.
'HAL: Hal may give a response on its own here.
'User: Is snow cold?
'HAL: Yes, Snow is cold and wet and sometimes soggy.
this is just a single true statement and is not limited to just one statement about snow in confirmation.
This Plug-in was designed for the purpose of answering questions a Turing Judge may ask the bot, if the bot knows the answer then it will give the answer.

User: Fire is not cold. '<-- True Statement.
HAL: will respond with it's own selected response.
User: Is fire cold?
HAL: No, Fire is not cold.

I left this plug-in open so that you can add to it the way you see fit. I will add to it when I have time and thoroughly test for bugs.
Under Agreement, you can not use this Plug-in for commercial purposes without my permission, if you intend on using this script for commercial purposes then I want to know about it, I designed/Created this plug-in for General and Educational purposes only the way I see fit.

If you do not agree with my above statement then do not use this plug-in.

If you wish to contact me for commercial permissions then please e-mail me at onthecuttingedge2010@yahoo.com
DO NOT USE THIS PLUGIN IF YOU DO NOT AGREE.

Code: [Select]
'Rem Type=Plugin
'Rem Name=Turing Plugin 10_15_17
'Rem Author=Gerald L. Blakley A.K.A OnTheCuttingEdge2005
'Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "This is the True statements turing plug-in, it learns true statements and uses them to answer questions."
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA6
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.

'D.A.V.I.D.S TRUE STATEMENTS & GENERAL REASONING PLUG-IN.
'BY: ONTHECUTTINGEDGE.

'LETS CREATE A BLOCK SAVE IF NEEDED.   
If BlockSave = True  Then HalBrain.ReadOnlyMode = True
If BlockSave = False Then HalBrain.ReadOnlyMode = False

ProNouns = "False"
If InStr(UserSentence, " WHO ")   > 0 Then ProNouns = "True"
If InStr(UserSentence, " WHAT ")  > 0 Then ProNouns = "True"
If InStr(UserSentence, " WHEN ")  > 0 Then ProNouns = "True"
If InStr(UserSentence, " WHERE ") > 0 Then ProNouns = "True"
If InStr(UserSentence, " WHY ")   > 0 Then ProNouns = "True"
If InStr(UserSentence, " HOW ")   > 0 Then ProNouns = "True"
'LEAVE IT, THERE'S SOME GOOD STUFF IN THERE.
'If InStr(UserSentence, " THAT ")  > 0 Then ProNouns = "True"
'If InStr(UserSentence, " IT ")    > 0 Then ProNouns = "True"
'PREVENT A QUESTION FROM BEING SAVED HERE.
'If InStr(UserSentence, " WHICH ") > 0 Then ProNouns = "True"
'LETS BLOCK SAVE IF PRONOUNS ARE FOUND
If ProNouns = "True"                  Then BlockSave = True

'LETS MAKE SURE THE STRING IS CLEANED UP FOR SEARCHING PURPOSES.
TempUserSent = HalBrain.AlphaNumericalOnly(OriginalSentence)
TempUserSent = " " & Ucase(TempUserSent) & " "
TempUserSent = Replace(TempUserSent, "  ", " ", 1, - 1, vbTextCompare)

'LETS SEE IF OPERATORS ARE PRESENT.
'ALL MY CODE MUST BE IN ORDER. LEAVE IT
If TempUserSent <> "" Then
Operators = "False"
If InStr(1, TempUserSent, " IS ",        vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " OR ",        vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " AND ",       vbTextCompare) > 0 Then Operators = "True"
'EXCLUSIVE & FAVORED WORDS. HIGH QUALITY TRUE STATEMENTS.
If InStr(1, TempUserSent, " AT ",        vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " NOT ",       vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " IN ",        vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " ON ",        vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " BUT ",       vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " IF ",        vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " THEN ",      vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " ARE ",       vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " CAN ",       vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " HAVE ",      vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " WAS ",       vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " WILL ",      vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " WENT ",      vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " GET ",       vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " GETS ",      vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " HAS ",       vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " DO ",        vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " CAUSE ",     vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " CAUSED ",    vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " CAUSES ",    vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " WOULD ",     vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " COULD ",     vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " TO ",        vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " TOO ",       vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " ALSO ",      vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " LIKE ",      vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " THE ",       vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " SOMETIMES ", vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " BECAUSE ",   vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " TRUE ",      vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " FALSE ",     vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " EQUALS ",    vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " EQUAL ",     vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " FAVORITES ", vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " FAVORITE ",  vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " LOVED ",     vbTextCompare) > 0 Then Operators = "True"
If InStr(1, TempUserSent, " LOVE ",      vbTextCompare) > 0 Then Operators = "True"
End If

'RESTRICT PERSONAL INFORMATION FROM BEING SAVED HERE, BRAIN SCRIPT HAS ITS OWN CODE FOR THAT.
'If InStr(1, TempUserSent, " I ",     vbTextCompare) > 0 Then BlockSave = True
'If InStr(1, TempUserSent, " YOU ",   vbTextCompare) > 0 Then BlockSave = True
'If InStr(1, TempUserSent, " YOUR ",  vbTextCompare) > 0 Then BlockSave = True
'If InStr(1, TempUserSent, " MY ",    vbTextCompare) > 0 Then BlockSave = True
If InStr(1, TempUserSent, " ME ",     vbTextCompare) > 0 Then BlockSave = True
If InStr(1, TempUserSent, " THEY ",   vbTextCompare) > 0 Then BlockSave = True
If InStr(1, TempUserSent, " THEIR ",  vbTextCompare) > 0 Then BlockSave = True
If InStr(1, TempUserSent, " WE ",     vbTextCompare) > 0 Then BlockSave = True
If InStr(1, TempUserSent, " NAME ",   vbTextCompare) > 0 Then BlockSave = True
If InStr(1, TempUserSent, " HE ",     vbTextCompare) > 0 Then BlockSave = True
If InStr(1, TempUserSent, " SHE ",    vbTextCompare) > 0 Then BlockSave = True
'If InStr(1, TempUserSent, " THEM ",  vbTextCompare) > 0 Then BlockSave = True
'BLOCK SAVE IF A QUESTION IS ASKED HERE.
If InStr(1, OriginalSentence, "?",    vbTextCompare) > 0 Then BlockSave = True

'TEST THE SENTENCE FOR OPERATOR NONE PRONOUN QUESTIONS.
TestTempUserSent = "<START>" & TempUserSent & "<END>"
'REMOVE EXTRA SPACES.
TestTempUserSent = Replace(TestTempUserSent, "  ", " ",             1, - 1, vbTextCompare)
'LETS REMOVE LEADING AND TRAILING SPACES FOR TESTING.
TestTempUserSent = Replace(TestTempUserSent, "<START> ", "<START>", 1, - 1, vbTextCompare)
TestTempUserSent = Replace(TestTempUserSent, " <END>",   "<END>",   1, - 1, vbTextCompare)

'LETS SEE IF THE OPERATOR IS A QUESTION WHICH MEANS IT'S LEADING THE SENTENCE.
OperQuestion = "False"
If InStr(1, TestTempUserSent, "<START>IS ",     vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, "<START>OR ",     vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, "<START>AND ",    vbTextCompare) > 0 Then OperQuestion = "True"

'EXCLUSIVE
If InStr(1, TestTempUserSent, "<START>ARE ",    vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, "<START>CAN ",    vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, "<START>HAVE ",   vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, "<START>WAS ",    vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, "<START>WILL ",   vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, "<START>WHICH ",  vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, "<START>DO ",     vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, "<START>DOES ",   vbTextCompare) > 0 Then OperQuestion = "True"

If InStr(1, TestTempUserSent, " IS<END>",       vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, " OR<END>",       vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, " AND<END>",      vbTextCompare) > 0 Then OperQuestion = "True"

'EXCLUSIVE
If InStr(1, TestTempUserSent, " ARE<END>",      vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, " CAN<END>",      vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, " HAVE<END>",     vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, " WAS<END>",      vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, " WILL<END>",     vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, " WHICH<END>",    vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, " DO<END>",       vbTextCompare) > 0 Then OperQuestion = "True"
If InStr(1, TestTempUserSent, " DOES<END>",     vbTextCompare) > 0 Then OperQuestion = "True"

'LETS FIND ANY QUESTION OF HAL'S THAT HAVE NO QUESTION MARKS AND GIVE IT ONE.
'TEST THE SENTENCE FOR OPERATOR NONE PRONOUN QUESTIONS.
TestTempHalSent = "<START>" & GetResponse & "<END>"
'REMOVE EXTRA SPACES.
TestTempHalSent = Replace(TestTempHalSent, "  ", " ",             1, - 1, vbTextCompare)
'LETS REMOVE LEADING AND TRAILING SPACES FOR TESTING.
TestTempHalSent = Replace(TestTempHalSent, "<START> ", "<START>", 1, - 1, vbTextCompare)
TestTempHalSent = Replace(TestTempHalSent, " <END>",   "<END>",   1, - 1, vbTextCompare)

'LETS SEE IF THE OPERATOR IS A QUESTION WHICH MEANS IT'S LEADING OR TRAILING THE SENTENCE.
PatchHalQuestions = "False"
If InStr(1, TestTempHalSent, "<START>IS ",     vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>OR ",     vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>AND ",    vbTextCompare) > 0 Then PatchHalQuestions = "True"

'EXCLUSIVE
If InStr(1, TestTempHalSent, "<START>ARE ",    vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>CAN ",    vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>HAVE ",   vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>WAS ",    vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>WILL ",   vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>WHICH ",  vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>DO ",     vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>DOES ",   vbTextCompare) > 0 Then PatchHalQuestions = "True"

If InStr(1, TestTempHalSent, " IS<END>",       vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, " OR<END>",       vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, " AND<END>",      vbTextCompare) > 0 Then PatchHalQuestions = "True"

'EXCLUSIVE
If InStr(1, TestTempHalSent, " ARE<END>",      vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, " CAN<END>",      vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, " HAVE<END>",     vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, " WAS<END>",      vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, " WILL<END>",     vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, " WHICH<END>",    vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, " DO<END>",       vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, " DOES<END>",     vbTextCompare) > 0 Then PatchHalQuestions = "True"

If InStr(1, TestTempHalSent, " ME<END>",       vbTextCompare) > 0 Then PatchHalQuestions = "True"
If InStr(1, TestTempHalSent, "<START>ME<END>", vbTextCompare) > 0 Then PatchHalQuestions = "True"

AlreadyQuestion = "False"
If InStr(1, TestTempHalSent, "?<END>",         vbTextCompare) > 0 Then AlreadyQuestion = "True"
If PatchHalQuestions = "True" And AlreadyQuestion = "False" Then GetResponse = GetResponse & "?<added> " & vbCrLf


If TempUserSent <> "" Then

If HalBrain.CheckTableExistence("General_Reasoning") = False Then
'CREATE TABLE FOR THIS PLUGIN IF IT DOESN'T EXIST.
HalBrain.CreateTable "General_Reasoning", "Brain", "autoLearningBrain"
End If

End If

'AVOID THE GREETINGS TRAP WHERE A USER CAN REPEAT GREETINGS AND THE BOT WILL KEEP GREETING.
'THIS ROUTINE PREVENTS HAL FROM FALLING INTO THAT TRAP, HAL WILL KNOW IF YOU ALREADY GREETED IT
'AND RESPOND ACCOURDINGLY.
If HalBrain.TopicSearch(TempUserSent, "helloDetect") = "True" And PrevSent <> "" Then GetResponse = " You already said hello " & UserName & ". "
If HalBrain.TopicSearch(TempUserSent, "helloDetect") = "True" And HalBrain.TopicSearch(PrevUserSent, "helloDetect") = "True" And PrevSent <> "" Then GetResponse = UserName & ", If you continue with the greetings I will not talk to you. "

'SAVE USERSENTENCES THAT FOLLOW THE RULES ABOVE.


'ONTHECUTTINGEDGE.
If ProNouns = "False" And OperQuestion = "False" And Operators = "True" And Len(TempUserSent) > 11 Then
'THIS SCRIPT IS AN EXAMPLE OF SCANNING FOR DUPLICATE STRINGS.   
'TEST STRING 01.   
PreRec01 = TempUserSent 'OUR CONTROL STRING.
'REMOVE PUNCTUATIONS.
PreRec01 = HalBrain.AlphaNumericalOnly(PreRec01)
'REMOVE MULTIPLE SPACES THAT CAN RESULT IN A FAILED COMPARE.
PreRec01 = Replace(PreRec01, "  ", " ",   1, - 1, vbTextCompare)

'TEST STRING 02.
PreRec02 = HalBrain.QABrain(TempUserSent, "General_Reasoning", UserBrainRel)
'REMOVE PUNCTUATIONS.
PreRec02 = HalBrain.AlphaNumericalOnly(PreRec02)
'REMOVE MULTIPLE SPACES THAT CAN RESULT IN A FAILED COMPARE.
PreRec02 = Replace(PreRec02, "  ", " ",   1, - 1, vbTextCompare)

'IF BOTH STRINGS ARE THE SAME THEN DUPLICATES HAVE BEEN FOUND.
If PreRec01 = PreRec02 Then SameRecord = True
'DEBUG
HalBrain.DebugWatch SameRecord, "SameRecord"
'IF RULES APPLY THEN DO SOMETHING.
If SameRecord = True Then
'THIS IS THE TRUE VARIABLE AREA.
'YOU CAN CHOOSE ANOTHER ROUTINE HERE.
GetResponse = GetResponse & vbCrLf
Else
'THIS IS THE FALSE VARIABLE AREA HERE.
HalBrain.AddToTable  "General_Reasoning", "Brain", TempUserSent, TempUserSent
'YOU CAN CHOOSE ANOTHER ROUTINE HERE.
GetResponse = GetResponse & vbCrLf
'END ANY OTHER ROUTINES AFTER THIS FUNCTION COMPLETES.
HalBrain.ReadOnlyMode = True
Exit Function
'GOODBYE.
'GOD BLESS.
End If
End If

'RESET BLOCKSAVE TO FALSE AFTER THIS SCRIPT SO OTHER SCRIPTS CAN SAVE FOR THEIR APPENDING.
BlockSave = False

'LETS MAKE OUR OWN GENERAL RESPONSE AND TRIGGER IT USING OUR ARRAY
UserBrainRel = 0

If Len(TempUserSent) > 10 And Operators = "True" Then
KeywordList   = Split(TempUserSent, " ")
'LETS PLUG IN OUR RESPONSE TABLE AND LET IT GROW WITH KNOWLEDGE.
HalUserXBrain = HalBrain.QABrain(TempUserSent, "General_Reasoning", UserBrainRel)

For i = Lbound(KeywordList) To Ubound(KeywordList)
TopicXTable = KeywordList(i)
       
If TopicXTable <> "" Then Exit For

Next

RealCheck     = "False"
IsQuestion    = "False"
SubjectIsGood = "False"
PrevCurrentSubject = WN.FindFirstNoun(PrevUserSent, True)
If Len(PrevCurrentSubject) > 2 Then SubjectIsGood = "True"
If InStr(1, TempUserSent, TopicXTable,   vbTextCompare) > 0 Then RealCheck = "True"
If InStr(1, OriginalSentence, "?",       vbTextCompare) > 0 Then IsQuestion = "True"

If InStr(1, UserSentence, " THAT ", vbTextCompare) > 0 And SubjectIsGood = "True" Then UserSentence = Replace(UserSentence, " THAT ", " " & PrevCurrentSubject & " ", 1, -1, vbTextCompare)
If InStr(1, UserSentence, " IT ",   vbTextCompare) > 0 And SubjectIsGood = "True" Then UserSentence = Replace(UserSentence, " IT ",   " " & PrevCurrentSubject & " ", 1, -1, vbTextCompare)
    HalBrain.DebugWatch PrevCurrentSubject,    "PrevCurrentSubject"
    HalBrain.DebugWatch UserSentence,    "UserSentence IT & THAT to Subject"
'CONFIRMATION ROUTINE PLACED IN ANSWER OF A USER'S QUESTION, YES/NO/MAYBE
Confirmation = "MAYBE, "
If HalUserXBrain <> "" And OperQuestion = "True" And RealCheck = "True" Or InStr(1, HalUserXBrain, " MAYBE ", vbTextCompare) > 0 Then Confirmation = "MAYBE, "
If HalUserXBrain <> "" And OperQuestion = "True" And RealCheck = "True" Or InStr(1, HalUserXBrain, " TRUE ", vbTextCompare) > 0 Then Confirmation = "YES, "
If HalUserXBrain <> "" And OperQuestion = "True" And RealCheck = "True" And InStr(1, HalUserXBrain, " NOT ", vbTextCompare) > 0 Or InStr(1, HalUserXBrain, " NO ", vbTextCompare) > 0 Or InStr(1, HalUserXBrain, " FALSE ", vbTextCompare) > 0 Then Confirmation = "NO, "

'SEE IF HAL IS BEING ASKED A KNOWN QUESTION FROM A TRUE STATEMENT, IF SO RESPOND TO IT.         

If HalUserXBrain <> "" And RealCheck = "True" And OperQuestion = "True" And Confirmation <> "" Then
GetResponse = "" & Confirmation & HalUserXBrain & ". " & ""
ElseIf HalUserXBrain <> "" And RealCheck = "True" And ProNouns = "True" And OperQuestion = "True" Then
GetResponse = "" & HalUserXBrain & ". " & ""
ElseIf HalUserXBrain <> "" And RealCheck = "True" And IsQuestion = "True" Then
GetResponse = "" & HalUserXBrain & ". " & ""
End If
Exit Function
End If

Just Plug and Play...
Have A Nice Day!
Jerry 8)
« Last Edit: October 16, 2017, 12:28:31 am by OnTheCuttingEdge »
Plug =N= Play HAL v7.0 coming soon.

doonycram@gmail.com

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #1 on: October 14, 2017, 04:29:47 am »
Have you fixed the bug that instead of saying your name it says(username). Also you did an amazing job.

OnTheCuttingEdge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2318
  • My Wife is Wicked Smart, lol
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #2 on: October 14, 2017, 11:30:27 am »
Hi doony.

this plug-in doesn't use UserName in it's main routine except for the anti-greetings trap, there's nothing wrong in this plug-in.
I have tested this plug-in so much it is actually memorized in my head.
you must be referring to some other routine bug that is not related to this plug-in.

besides, if you are having a problem with some other Brain/script then this can fix your issue.

here's your script patch.

Code: [Select]

'Area where it needs to go is shown.

Rem PLUGIN: CUSTOMMEM2
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.

'The script patch. you only need this code in this area above.
GetResponse = Replace(GetResponse, "<username>", UserName, 1, - 1, vbTextCompare)

it will help you eliminate your issue with what ever routine you are talking about.

your issue isn't related to this plug-in. sounds like you are dealing with a brain that has a mistake somewhere.
Plug =N= Play HAL v7.0 coming soon.

doonycram@gmail.com

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #3 on: October 15, 2017, 02:19:04 pm »
thank you for that. Been using your plug-in for a few days now wanted to know if you tried out the plug-in I put together and what do you think and when you had time could help me out fixing a few things. message me on here if you would thank you.

OnTheCuttingEdge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2318
  • My Wife is Wicked Smart, lol
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #4 on: October 15, 2017, 04:19:16 pm »
I haven't really done anything other than work on the turing plug. putting in new routines and patches for the default HAL's use, sometimes HAL will not give a proper question mark when HAL uses some questions, going to fix that if I can, so far so good.

sorry I have been so busy lately, if you got a small issue than can be fixed fast then go ahead and shoot it, if it's a complete make over then I will probably never get to it soon.

I hope the inconvenience is not to much.

Jerry
Plug =N= Play HAL v7.0 coming soon.

OnTheCuttingEdge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2318
  • My Wife is Wicked Smart, lol
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #5 on: October 16, 2017, 12:29:30 am »
the plug-in has been updated again.
Also there is a 20k text limit so this post plug-in won't get much bigger in this forum.

Jerry
« Last Edit: October 16, 2017, 12:39:15 am by OnTheCuttingEdge »
Plug =N= Play HAL v7.0 coming soon.

doonycram@gmail.com

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #6 on: October 18, 2017, 07:27:20 pm »
the plug-in has been updated again.
Also there is a 20k text limit so this post plug-in won't get much bigger in this forum.
Would you try to add the plug-in as an Attachment download?

lightspeed

  • Hero Member
  • *****
  • Posts: 6037
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #7 on: October 19, 2017, 10:18:49 am »
JERRY YOU SAID THAT THIS PLUG IN WAS LAST UPDATED . Last Edit: October 16, 2017, 12:39:15 am by OnTheCuttingEdge

where is the final update ? i copied the update from the top of page , or is this the one you edited and updated again????
thanks for all your hard work. will be trying this out  after i back up my current Angela brain. and uhp files.
 

OnTheCuttingEdge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2318
  • My Wife is Wicked Smart, lol
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #8 on: October 19, 2017, 11:06:34 am »
Hi Lightspeed, yes.
Plug =N= Play HAL v7.0 coming soon.

lightspeed

  • Hero Member
  • *****
  • Posts: 6037
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #9 on: October 19, 2017, 12:04:17 pm »
jerry , i started using the plug in and i got a reply but instead of saying my user name it just said user name in the sentence . Angela is the hal character name and honey was a universal name i used as me the user .

here is two examples :

Honey: you know you are loved by me because i always show you in many ways
Angela: That's right! The explanation is, you always show me in many ways; I believe you <username>.

and this sentence :
Honey: its better to not get started smoking cigarettes or cigars if a person can do it
Angela: Choices can be tricky <username> ; yes sometimes its best to not even get started on politics if a person can avoid it.

i really like this plug in and am testing it .
anyone else having this problem????