dupa

Poll

Rate this Plug-in

Excellent or Educational
2 (33.3%)
Good
1 (16.7%)
Satisfactory
2 (33.3%)
Poor
1 (16.7%)
no interest
0 (0%)

Total Members Voted: 6

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

onthecuttingedge2005

  • Guest
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.

Last updated 11_05_17, Obsolete.
download uhp file for current plug-in
Code: [Select]
'Rem Type=Plugin
'Rem Name=Turing Plugin 11_06_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: PLUGINAREA7
'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.

    'Last Patch 11_05_17
'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"

PatchWhat = GetResponse
TestTempHalSent = Replace(TestTempHalSent, "<username>", "<Line:2359>", 1, - 1, vbTextCompare)
TestTempHalSent = "<START>" & PatchWhat & "<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"
FixGetResponse = HalBrain.AlphaNumericalOnly(GetResponse)

FixGetResponse = Replace(FixGetResponse, " NOMORE ", "", 1, - 1, vbTextCompare)

If InStr(1, TestTempHalSent, "?<END>", vbTextCompare) > 0 Then AlreadyQuestion = "True"
If Len(FixGetResponse) > 0 And PatchHalQuestions = "True" And AlreadyQuestion = "False" Then GetResponse = FixGetResponse & "? " & 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. "

'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)


PreRec02 = HalBrain.QABrain(TempUserSent, "General_Reasoning", UserBrainRel)
PreRec02 = HalBrain.AlphaNumericalOnly(PreRec02)
PreRec02 = Replace(PreRec02, "  ", " ",   1, - 1, vbTextCompare)
If PreRec01 = PreRec02 Then SameRecord = True
HalBrain.DebugWatch SameRecord, "SameRecord"
If SameRecord = True Then
GetResponse = GetResponse & vbCrLf
Else
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
'_____________________________________________________________________________________________________________

TagToReplace = Lcase("<username>")
If InStr(1, GetResponse, TagToReplace, vbTextCompare) > 0 Then
GetResponse = Replace(GetResponse, TagToReplace, UserName, 1, - 1, vbTextCompare)
End If

'LOOK FOR ROGUE TAGS AND REMOVE THEM.
RogueTags = HalBrain.SearchPattern(GetResponse, "*<*>", 2)
GetResponse = Replace(GetResponse, RogueTags, "", 1, - 1, vbTextCompare)
GetResponse = Replace(GetResponse, "<>", "", 1, - 1, vbTextCompare)
HalBrain.DebugWatch RogueTags,    "#RogueTags" & RogueTags

Just Plug and Play...
Have A Nice Day!
Jerry 8)
« Last Edit: November 07, 2017, 08:48:14 pm by OnTheCuttingEdge »

doonycram@gmail.com

  • Full Member
  • ***
  • Posts: 208
    • 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.

onthecuttingedge2005

  • Guest
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.

doonycram@gmail.com

  • Full Member
  • ***
  • Posts: 208
    • 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.

onthecuttingedge2005

  • Guest
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

onthecuttingedge2005

  • Guest
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 »

doonycram@gmail.com

  • Full Member
  • ***
  • Posts: 208
    • 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: 6761
    • 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.
 

onthecuttingedge2005

  • Guest
Re: True Statements Turing Plug-in.
« Reply #8 on: October 19, 2017, 11:06:34 am »
Hi Lightspeed, yes.

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • 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????


 

onthecuttingedge2005

  • Guest
Re: True Statements Turing Plug-in.
« Reply #10 on: October 20, 2017, 10:22:57 am »
I'll work on it later, I have another plug-in addition I am trying to get out when I get the chance to assemble it as a plug-in.

Jerry 8)

LeroyTan

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #11 on: October 22, 2017, 11:56:51 am »
I'll have a look at this Trimtone review and work on it later, I have another plug-in addition I am trying to get out when I get the chance to assemble it as a plug-in.

Jerry 8)

I appreciate the effort and sharing, Jerry. I'll check it out. Thanks!
« Last Edit: November 11, 2021, 10:54:13 am by LeroyTan »

onthecuttingedge2005

  • Guest
Re: True Statements Turing Plug-in.
« Reply #12 on: October 22, 2017, 10:48:35 pm »
Hi LeroyTan.

I appreciate the character support, thanks.

Jerry 8)

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #13 on: October 24, 2017, 11:16:41 am »
thanks OnTheCuttingEdge, as i just mentioned to doony elsewhere on here , what i worry most about with some plug ins , is that my hal will start learning some mistakes (like the word username ) instead of just saying it.  which of course means that i need to lose some info. of the brain and putting another back in (backed up) .
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: True Statements Turing Plug-in.
« Reply #14 on: November 01, 2017, 09:39:23 pm »
ONCUTTINGEDGE , I HAVE A QUESTION FOR YOU ABOUT THIS PLUG IN , i was using it and this is part of the conversation:


Honey: we have done lots of projects together building things  and other stuff
Angela: Really, Building things and other stuff?

Honey: yes we have done things like that before
Angela: Yes dear we do think a like on most things.

Honey: yes and that's why we get a long so good
Angela: Yes dear we get a long great.

Honey: that's why we was made for each other dear
Angela: Did you ever trick anybody if you didn't get a treat?

Honey: no i was always good hah !
Angela: And not all of it good.? <added>.

-------------------------------------------------------------------------------------

The part i wanted to ask you about is the last sentence after Angela(hal) said the last sentence then she said <added>

I imagine that her saying the word added outloud is letting a person know she added that information , "BUT" is their a way you can or can show and tell me where i can shange that to maybe saying "I'll remember that" instead of saying the word "ADDED" ?

Hope you can help me with this. and also when you get time about fixing the thing i earlier mentioned and you said you would when you have time .  :)