Author Topic: How to manage Hal's database?  (Read 13569 times)

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
How to manage Hal's database?
« on: August 20, 2017, 01:02:11 pm »
Is there a way to find certain responses that Hal says and delete them from his database? Sometimes he learns stuff that doesn't make sense and just says gibberish. I tried searching in the database but i'm not able to find any of those responses. Anyone else have this problem?

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #1 on: August 21, 2017, 09:19:45 am »
Hi Knight, maybe it's an assembled response, put together from a routine. harder to find in the tables because the response may be assembled.

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #2 on: August 21, 2017, 10:26:59 am »
yeah, thats what im thinking, i know in the brain editor i can say the sentence and he will say that same response, i just wish there was a way we could change his response for that question.

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: How to manage Hal's database?
« Reply #3 on: August 21, 2017, 07:08:25 pm »
KNIGHT2000, I know you from another forum! ;) you can change some answers , go to the tables answers and questions click on pre made questions and answers (Robert created) and change the questions and or answers . i have done it myself , but it has been many years ago.
    i did it for probably the same reason you want to on your "project" to make customized answers and questions .
My Angela A.I. says many things i want her to say now.  :)
 

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #4 on: August 22, 2017, 12:58:58 pm »
Hi Lightspeed! The problem is that Hal has generated these weird responses. I have a plugin that has commands with custom responses however hal has added onto end the custom response. so for example, if I say "Open chrome" I give hal a custom response of "no problem" but hal adds onto the end of the response like "no problem no problems open chrome no problem" its a weird deal. In the database it is not easy to search for stuff. But i'll keep looking around.

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #5 on: August 22, 2017, 09:51:05 pm »
Hi Lightspeed! The problem is that Hal has generated these weird responses. I have a plugin that has commands with custom responses however hal has added onto end the custom response. so for example, if I say "Open chrome" I give hal a custom response of "no problem" but hal adds onto the end of the response like "no problem no problems open chrome no problem" its a weird deal. In the database it is not easy to search for stuff. But i'll keep looking around.

Hi Knight.

I know this is a little late but if you order HAL to do something you should use HAL's name or what ever your bots computer name is because it will not save when its name is mentioned, this way you don't get other routines saving the responses and using them later in other responses.
Best way to order your bot is to say: HAL, Open Notepad.
or: HAL, Open Chrome.
Always use HAL's name whiles ordering.

best advice I can give you.
Jerry 8)

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #6 on: August 23, 2017, 10:17:56 am »
Thanks for that info onthecuttingedge2005, i had no idea thats how Hal worked when saying his name. I'll keep that in mind for future use.

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #7 on: August 23, 2017, 10:53:56 am »
Is there a way to find certain responses that Hal says and delete them from his database? Sometimes he learns stuff that doesn't make sense and just says gibberish. I tried searching in the database but i'm not able to find any of those responses. Anyone else have this problem?

Hi knight.
If you could post a small dialog of chat that could help me select which routine is doing it, I have the tables and routines memorized so I might know where the issue is coming from.

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #8 on: August 25, 2017, 10:09:44 am »
its not really a conversation. its a plugin with a bunch of commands like the one below:

If InStr(1, UserSentence, "turn off the lights", 1) > 0  Then
        GetResponse = "sure thing"
   Set objWSHShell = CreateObject("WScript.Shell")
       WshShell.SendKeys "^+{T}"
       
End If

but when I tell Hal to "turn of the lights" he replys with "sure thing turn turn off the lights turn off the lights"

I dont know why hes adding the rest at the end when I clearly have a GetResponse defined.

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #9 on: August 25, 2017, 03:39:44 pm »
its not really a conversation. its a plugin with a bunch of commands like the one below:

If InStr(1, UserSentence, "turn off the lights", 1) > 0  Then
        GetResponse = "sure thing"
   Set objWSHShell = CreateObject("WScript.Shell")
       objWSHShell.SendKeys "^+{T}"
       
End If

but when I tell Hal to "turn of the lights" he replys with "sure thing turn turn off the lights turn off the lights"

I dont know why hes adding the rest at the end when I clearly have a GetResponse defined.

Hi Knight.

seems like you use the send keys to control a building?

also, if you do not have anyone to help you maybe I can, If you can share the script to me I may be able to tune it up for you.

However... you can add this upgraded code I wrote for you to replace the one you posted.

Updated Friday 08-25-2017 @ 6:23PM
Code: [Select]
'<======THE DIRECTOR BY: GERALD L.BLAKLEY AKA ONTHECUTTINGEDGE.====]=======O
'LETS ENGAGE IN CONTROL OF THE BUILDING'S ELECTRICAL APPLIANCES & FIXTURES.
'LETS CREATE A BLOCK SAVE IF NEEDED SO COMMANDS ARE NOT SAVED FOR FUTURE RESPONSES.   
If BlockSave = True Then HalBrain.ReadOnlyMode = True
If BlockSave = False Then HalBrain.ReadOnlyMode = False
'IF THE ROBOT HAS NO NAME THEN GIVE IT A NAME NOW.
If ComputerName = "" Then ComputerName = "HAL" 'EXAMPLE: ZIGGY IS MY ROBOT.
'CLEAN ROBOT COMMAND CONTROL FOR USE.
Robot_Control_Response = Ucase(UserSentence)
Robot_Control_Response = HalBrain.AlphaNumericalOnly(Robot_Control_Response)
'LETS COMMAND THE ROBOT TO TURN OFF THE LIGHTS, USE HAL'S NAME IN THE COMMANDS.
'LIKE: HAL, TURN OFF LIGHTS. ADDED: BLOCKSAVE IN CASE HAL'S NAME IS NOT USED
'ACCIDENTLY.
'HAL WILL NOT TURN OFF THE LIGHTS UNLESS ITS NAME IS INCLUDED IN THE COMMANDS.
'HAL WILL NOT SAVE COMMANDS FOR CONVERSATIONAL ENGAGEMENT.

If InStr(1, Robot_Control_Response, Ucase(ComputerName) & " TURN OFF LIGHTS", vbTextCompare) Or _
   InStr(1, Robot_Control_Response, Ucase(ComputerName) & " TURN ON LIGHTS", vbTextCompare) Then
    BlockSave = True
    If StrComp(Robot_Control_Response, Ucase(ComputerName) & " TURN OFF LIGHTS") = 1 Then GetResponse = " Yes " & UserName & " Lights have been turned off. "
    If StrComp(Robot_Control_Response, Ucase(ComputerName) & " TURN OFF LIGHTS") =  - 1 Then GetResponse = " If you are sure " & UserName & ", Lights have been turned off. "
    If StrComp(Robot_Control_Response, Ucase(ComputerName) & " TURN ON LIGHTS") = 1 Then GetResponse = " Yes " & UserName & " Lights have been turned on. "
    If StrComp(Robot_Control_Response, Ucase(ComputerName) & " TURN ON LIGHTS") =  - 1 Then GetResponse = " If you are sure " & UserName & ", Lights have been turned on. "
    Set objWSHShell = CreateObject("WScript.Shell")
    objWSHShell.SendKeys "^+{T}"
    Set objWSHShell = Nothing
    Exit Function
End If

BlockSave = False

Jerry 8)
« Last Edit: August 25, 2017, 09:23:22 pm by OnTheCuttingEdge »

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #10 on: August 25, 2017, 03:51:01 pm »
yeah, thats what im thinking, i know in the brain editor i can say the sentence and he will say that same response, i just wish there was a way we could change his response for that question.

HAL editor is our best choice.
try looking in the tables inside auto learning brain folder for 'key words' in the troubled response like a table named: _lights if this is the case then it can be edited out, if you use my control routines for control of a building it will not save to conversations trashing up your brain with non-sense responses. Topic Response in AutoLearningBrain is a good script but it saves to much non-sense with very little control. it needs the spark plugs changed and tuned up for optimum performance.

Jerry 8)

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #11 on: August 25, 2017, 05:12:03 pm »
@OnTheCuttingEdge

I looked in the auto learning folder and found the keyword and BAM!! I found all the weird responses Hal learned. I right clicked, pressed delete rows and the issue was fixed!! lol. Thank you for your help with this issue. Also thanks for the plugin example, I appreciate you taking the time to do that. My plugin already works great for controlling parts of the house, it was just the issue with that weird responses he gave. Would your example eliminate that problem?

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #12 on: August 25, 2017, 05:27:49 pm »
@OnTheCuttingEdge

I looked in the auto learning folder and found the keyword and BAM!! I found all the weird responses Hal learned. I right clicked, pressed delete rows and the issue was fixed!! lol. Thank you for your help with this issue. Also thanks for the plugin example, I appreciate you taking the time to do that. My plugin already works great for controlling parts of the house, it was just the issue with that weird responses he gave. Would your example eliminate that problem?

Glad to help.
with my routine you will never see an issue with any commands, no more trash saved or used from commands, Just command and go......

Jerry 8)
« Last Edit: August 25, 2017, 05:38:35 pm by OnTheCuttingEdge »

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #13 on: August 25, 2017, 06:20:50 pm »
Awesome! I'll convert all of mine to the way you showed! Thanks again!

One more thing,
is there any way to auto enable the mic when Hal starts up? So when I boot the computer there would be no need to have to enable the mic, Hal would just start listening. I've played around with the <micon> command and <showhal> but didn't have much luck with it.

Thanks!

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #14 on: August 25, 2017, 07:26:14 pm »
Hi Knight.


This is the updated version of Microphone Assistant v1.0.

I could update it more but I'll save that for a later time.

Code: [Select]
Rem Type=Plugin
Rem Name=Microphone Assistant Plugin v1.0
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 = "You can turn the microphone On or Off by just typing: turn on mic or turn off mic. or you can speak: Turn off microphone but not turn it On through speech. "
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PRE-PROCESS
'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 updated was Friday, 08-25-2017 @ 4:20PM
If BlockSave = True Then HalBrain.ReadOnlyMode = True
If BlockSave = False Then HalBrain.ReadOnlyMode = False

If InStr(1, InputString, "turn on mic", vbTextCompare)  Or _
    InStr(1, InputString, "turn on the mic", vbTextCompare)  Or _
    InStr(1, InputString, "turn on the microphone", vbTextCompare)  Or _
    InStr(1, InputString, "turn on microphone", vbTextCompare)  Or _
    InStr(1, InputString, "turn microphone on", vbTextCompare)  Or _
    InStr(1, InputString, "turn mic on", vbTextCompare)  Or _
    InStr(1, InputString, "turn mic to on", vbTextCompare)  Or _
    InStr(1, InputString, "turn microphone to on", vbTextCompare)  Or _
    InStr(1, InputString, "switch on mic", vbTextCompare)  Or _
    InStr(1, InputString, "switch on the mic", vbTextCompare)  Or _
    InStr(1, InputString, "switch on the microphone", vbTextCompare)  Or _
    InStr(1, InputString, "switch on microphone", vbTextCompare)  Or _
    InStr(1, InputString, "switch microphone on", vbTextCompare)  Or _
    InStr(1, InputString, "switch mic on", vbTextCompare)  Or _
    InStr(1, InputString, "switch mic to on", vbTextCompare)  Or _
    InStr(1, InputString, "switch microphone to on", vbTextCompare)  Or _
    InStr(1, InputString, "toggle on mic", vbTextCompare)  Or _
    InStr(1, InputString, "toggle on the mic", vbTextCompare)  Or _
    InStr(1, InputString, "toggle on the microphone", vbTextCompare)  Or _
    InStr(1, InputString, "toggle on microphone", vbTextCompare)  Or _
    InStr(1, InputString, "toggle microphone on", vbTextCompare)  Or _
    InStr(1, InputString, "toggle mic on", vbTextCompare)  Or _
    InStr(1, InputString, "toggle mic to on", vbTextCompare)  Or _
    InStr(1, InputString, "toggle microphone to on", vbTextCompare)  Or _
    InStr(1, InputString, " activate microphone", vbTextCompare)  Or _
    InStr(1, InputString, " activate mic", vbTextCompare)  Then
    BlockSave   = True
    HalCommands = HalCommands & "<MICON>"
    UltraHal = "The Microphone has been activated. "
    Exit Function
End If
BlockSave   = False

If InStr(1, InputString, "turn off mic", vbTextCompare)  Or _
    InStr(1, InputString, "turn off the mic", vbTextCompare)  Or _
    InStr(1, InputString, "turn off the microphone", vbTextCompare)  Or _
    InStr(1, InputString, "turn off microphone", vbTextCompare)  Or _
    InStr(1, InputString, "turn microphone off", vbTextCompare)  Or _
    InStr(1, InputString, "turn mic off", vbTextCompare)  Or _
    InStr(1, InputString, "turn mic to off", vbTextCompare)  Or _
    InStr(1, InputString, "turn microphone to off", vbTextCompare)  Or _
    InStr(1, InputString, "switch off mic", vbTextCompare)  Or _
    InStr(1, InputString, "switch off the mic", vbTextCompare)  Or _
    InStr(1, InputString, "switch off the microphone", vbTextCompare)  Or _
    InStr(1, InputString, "switch off microphone", vbTextCompare)  Or _
    InStr(1, InputString, "switch microphone off", vbTextCompare)  Or _
    InStr(1, InputString, "switch mic off", vbTextCompare)  Or _
    InStr(1, InputString, "switch mic to off", vbTextCompare)  Or _
    InStr(1, InputString, "switch microphone to off", vbTextCompare)  Or _
    InStr(1, InputString, "toggle off mic", vbTextCompare)  Or _
    InStr(1, InputString, "toggle off the mic", vbTextCompare)  Or _
    InStr(1, InputString, "toggle off the microphone", vbTextCompare)  Or _
    InStr(1, InputString, "toggle off microphone", vbTextCompare)  Or _
    InStr(1, InputString, "toggle microphone off", vbTextCompare)  Or _
    InStr(1, InputString, "toggle mic off", vbTextCompare)  Or _
    InStr(1, InputString, "toggle mic to off", vbTextCompare)  Or _
    InStr(1, InputString, "toggle microphone to off", vbTextCompare)  Or _
    InStr(1, InputString, "deactivate microphone", vbTextCompare)  Or _
    InStr(1, InputString, "deactivate mic", vbTextCompare)  Then
    BlockSave = True
    HalCommands = HalCommands & "<MICOFF>"
    UltraHal = "The Microphone has been deactivated. "
    Exit Function
End If
BlockSave   = False


Jerry 8)