dupa

Author Topic: hal blank answers still error even with script to stop it need help  (Read 40109 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
i am still getting blank asnwers from hal from time to time , even though i put a script in the brain that someone made to stop hal from giving blank answers , as far as i know i did it right, i have no plug ins checked so thats not causing it . can anyone help me get this solved , "please!!"
here is a pic of the script and where i have it in my custom angela brain . any help on this sure would be appreciated "alot!!!"
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #1 on: October 03, 2010, 04:29:59 pm »
  There was a big thing about blank answers from Hal quite a while ago, the answer to the problem was not found.  A while latter OTC declared he found the cause and solution, Mr. M looked at his cause and soultion and agreed. 
  Try a search blank answers I'd guess with OTC name.
I'm hoping the script you're using isn't the one given by OTC.
Carl2
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #2 on: October 03, 2010, 06:21:51 pm »
hi carl2 what do you mean "Mr. M looked at his cause and soultion and agreed. " do you mean that otc did correct it or didn't ?? i will try to see what i can find to on this .
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #3 on: October 03, 2010, 06:40:55 pm »
It was sort of speculated that the nature or shortness of one's question or statement might cause Hal to "respond" with a blank answer.

Such is not the case as I too, still receive a blank response from Hal from time to time and the majority of my statements are fairly substantial and not simply a few words.

Sometimes Hal's blank responses simply go away for a while but I have no way of knowing when or if it will happen. This puts to rest any ideas as to whether the situation is repeatable. For the most part, NO, I can not duplicate it so that Hal provides a blank answer but more often than not, during the course of a normal conversation, it will simply reply with a blank. If you press ENTER it triggers the blank response by the user routine and says, "would you please say something" or to that effect.

While it's not a total bummer, it is an irritating occurrence.

Glad you mentioned it Lonnie!
In the world of AI it's the thought that counts!

- Art -

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #4 on: October 03, 2010, 11:02:08 pm »
It's happening because Hal is losing connection to the database.
If that happens, you need to restart. It's not a script issue. When Robert agreed, I didn't understand why. I did understand why the script was written the way it was to try to fix it, but that isn't the issue.
It's a program issue, outside of the script.
It happens with a completely fresh Hal (no plugins).
Robert....on to you.
 

Amanda Interactive

  • Newbie
  • *
  • Posts: 36
    • View Profile
    • AmandaInteractive.Com
Re: hal blank answers still error even with script to stop it need help
« Reply #5 on: October 04, 2010, 02:33:32 am »
It's most likely an internal script time out issue due to a slight process overload occurring during the actual database response search routine. So Robert is probably the only one that can fix that. Don't bother wasting your time with someone else's script fix for the problem. Instead try running your Hal with fewer programs and processes running on your system, and then it might occur less often or not at all. I know how to force the problem to happen on will which is why I know that one possible reason is Hal process overload especially on a multicore system. If you are not running a Haptek character in Hal you can try using the system task manager to switch the main Hal process to use all cores on a multicore system and then it might work better too.
« Last Edit: October 04, 2010, 02:39:33 am by Amanda Interactive »

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #6 on: October 04, 2010, 07:47:40 am »
If all this is right then this is truly a hal program issue which as someone said will have to be fixed by robert , and this being such a wide issue this "should" be a "PRIORITY FIX ISSUE " . And as someone said it does it randomly so no one knows when a blank answer and having to restart hal will happen , i hate getting hal talking good in conversation and then it just stops "i" am greatful for hal and for all robert has done with upgrades etc. but this is an issue that sure needs to be fixed "BADLY!"
What if someone wanted to use hal for robotics etc. i know will does use it that way , it would be a shame if it can;t be relied on and that every so often you have to exit hal and restart hal to make it work right again .
I know Robert has a lot going on but i do hope he checks in on the forum and see's this and tries to get a fix in for it soon .  ;)

p.s. i know it is additional work but with pc's progressing multiple cores etc. robert will have to (if this is the issue with hal stopping from time to time ) have to adapt hal to work with newest systems .
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #7 on: October 04, 2010, 08:21:49 am »
  I did a search and was able to find what I mentioned earlier, the blank responses.
Link:  http://www.ultrahal.com/community/index.php?topic=6979.0.  As I mentioned earlier the blank answers became a huge thing at the forum, Rob M was involved. 
  I'm not sure if this is the fix you mentioned in the frist post.
Carl2
 

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #8 on: October 05, 2010, 04:37:54 pm »
It's most likely an internal script time out issue due to a slight process overload occurring during the actual database response search routine. So Robert is probably the only one that can fix that. Don't bother wasting your time with someone else's script fix for the problem. Instead try running your Hal with fewer programs and processes running on your system, and then it might occur less often or not at all. I know how to force the problem to happen on will which is why I know that one possible reason is Hal process overload especially on a multicore system. If you are not running a Haptek character in Hal you can try using the system task manager to switch the main Hal process to use all cores on a multicore system and then it might work better too.

EXACTLY!
:)
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
Re: hal blank answers still error even with script to stop it need help
« Reply #9 on: October 06, 2010, 05:49:00 pm »
So the script might be timing out... aka... not finishing. Well then its obviously not reporting any errors....
Of course there are other ways of exiting a script quietly i.e. putting 'Exit Function' inside the UltraHal or GetResonse functions. I don't think 'WScript.Quit' is supported or else that could also cause a problem. If you were desperate enough you could always go through Hal's brain and erraticate all 'Exit Functions' just to be sure thats not the problem ( I wouldn't recommend it though  ;))


Without error reporting it's difficult to know what the problem could be.


However, if you want to try this you can. It is very simple. If Hal simply has nothing to say then this should make him/her talk. If the brain script is quietly exiting (somehow) then this script will not work. Or if the databases are timing out then this should make Hal say something nonetheless.

Code: [Select]
Rem Type=Plugin
Rem Name=Thoughtless
Rem Author=snowman
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = ""
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

'...........................................................................
'...........................................................................

Rem PLUGIN: POST-PROCESS
HalBrain.ReadOnlyMode = True



If UltraHal = "" Then
   Randomize
   Select Case int(rnd()*4)
      Case 1
      UltraHal = "Sometimes I'm speechless. This is one of those times."
      Case 2
      UltraHal = "Could you please say that again? I don't think I heard you correctly."
      Case 3
      UltraHal = "Huh? I'm not sure I heard you."
      Case Else
      UltraHal = "What did you say? Please repeat what you said."
      End Select
End If
End Select
End If


'...........................................................................
'...........................................................................
'End of Plugin



I also recommend  placing my GetResponsetracker.uhp plugin in your script. If you use this plugin, then the next time Hal doesn't say something then you or I could look at the GetResponse.log file that it creates and see what Hal was thinking. We could determine when Hal decided not to respond, what Hal was going to say but didn't, or even when the Hal script decided not to work any longer (aka. not all the logs reported).


 

Code: [Select]
Rem Type=Plugin
Rem Name=GetResponseTracker
Rem Author=snowman
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "This plugin creates a log called GetResponse.log with the Ultra Hal Assistant Directory. It tracks the developement and change of Ulta Hal's responses. This can be used for troubleshooting Errors within the Ulta Hal brain. "
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub




'..........................................................................................
Rem PLUGIN: PRE-PROCESS
'..........................................................................................
'Clean previous log

Set fso = CreateObject("Scripting.FileSystemObject")
MyDir = fso.GetAbsolutePathName(".") & "\"
Set objTextFile = fso.OpenTextFile(MyDir & "GetResponse.log", 2, True)
objTextFile.Close


'..........................................................................................
Rem PLUGIN: CUSTOMMEM
'..........................................................................................


GetResponse = LogWriter("CUSTOMMEM", GetResponse)


'..........................................................................................
Rem PLUGIN: PLUGINAREA1
'..........................................................................................


GetResponse = LogWriter("PLUGINAREA1", GetResponse)

 

'..........................................................................................
Rem PLUGIN: PLUGINAREA2
'..........................................................................................


GetResponse = LogWriter("PLUGINAREA2", GetResponse)


'..........................................................................................
Rem PLUGIN: PLUGINAREA3
'..........................................................................................


GetResponse = LogWriter("PLUGINAREA3", GetResponse)


'..........................................................................................
Rem PLUGIN: PLUGINAREA4
'..........................................................................................


GetResponse = LogWriter("PLUGINAREA4", GetResponse)


'..........................................................................................
Rem PLUGIN: PLUGINAREA5
'..........................................................................................


GetResponse = LogWriter("PLUGINAREA5", GetResponse)


'..........................................................................................
Rem PLUGIN: LOWQUALITYRESPONSES
'..........................................................................................


GetResponse = LogWriter("LOWQUALITYRESPONSES", GetResponse)


'..........................................................................................
Rem PLUGIN: PLUGINAREA6
'..........................................................................................


GetResponse = LogWriter("PLUGINAREA6", GetResponse)


'..........................................................................................
Rem PLUGIN: PLUGINAREA7
'..........................................................................................


GetResponse = LogWriter("PLUGINAREA7", GetResponse)


'..........................................................................................
Rem PLUGIN: CUSTOMMEM2
'..........................................................................................


GetResponse = LogWriter("CUSTOMMEM2", GetResponse)


'..........................................................................................
Rem PLUGIN: POST-PROCESS
'..........................................................................................


UltraHal = LogWriter("POST-PROCESS", UltraHal)


'..........................................................................................
Rem PLUGIN: FUNCTIONS
'..........................................................................................


Function LogWriter(strlocation, strHalResponse)

keepvar1 = strHalResponse
If strHalResponse = "" THen strHalResponse = "<empty>"

Set fso = CreateObject("Scripting.FileSystemObject")
MyDir = fso.GetAbsolutePathName(".") & "\"
Set objTextFile = fso.OpenTextFile(MyDir & "GetResponse.log", 8, True)
objTextFile.WriteLine("Report#" & strlocation  & vbCrLf & strHalResponse & vbCrLf & vbCrLf)
objTextFile.Close

strHalResponse = ""
LogWriter = keepvar1
End Function

'..........................................................................................

'End of Plugin




As always, if anyone wants to add to this, or change anything then go ahead and have fun.

I don't know if it will help Lightspeed, but I hope it will. :)
« Last Edit: December 01, 2010, 04:16:50 pm by snowman »
Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #10 on: October 06, 2010, 06:56:25 pm »
thanks snowman.
i have done some of this kind of stuff trying to figure it out, and atleast every time that i have experianced the problem it was failing at a return from the database, but with no error.
the script continues to run every time.
if i replaced the value that should have been returned from the database with some other value if the return was blank, then i got the replaced value running properly through the rest of the script.
now, i don't know much at all about the database connection, but every time i see it happen it is getting a value from the database but it is a blank value and not boolean.
i just didn't know where to go from there. (other than making sure it happened with a brand new hal install...clean install from the registry down to the folders being wiped...ect.  which i have done)
i have also checked to make sure that it is not just pulling from a field that was a "blank" field. it will not return some values from the database after the first blank response. instead, the script usually errors while trying to get a value from the database. i.e. an error popup will occur then. but there is no error popup on the first blank return. the error popup only happens during the next script run.
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
Re: hal blank answers still error even with script to stop it need help
« Reply #11 on: October 06, 2010, 08:41:21 pm »
Well, in my experience, such as it is, that sounds like either Robert or one of his software engineers forgot to add an error report for this kind of problem.

I know another error that seems to work in this mannor. If you add the following to the POST-PROCESS Area then Hal will stop talking if you send the command "testme" and then it will never respond again until after you restart Hal. It probably interferes with the database somehow. It never leaves an error message, just blank responses. And no, I don't type the command testme every time afterwards. 8)

If InputSring = "testme" Then
UltraHal = ""
End If

It sounds like a variable is being stored to either a temperary database entry or something simuliar and then this new database entry is causing the following errors.

For instance, if, like you said, an empty variable is returned once, then the empty variable is then entered into the database probably using the HalBrain.StoreVars() function, effectively causing many other failures. (I'm guessing)

But if you already know how to fix the emtpy database return error by replacing it with a valid entry then you're the man with the plan... well until Robert fixes it himself with the New Hal. ;)
« Last Edit: October 08, 2010, 08:37:59 pm by snowman »
Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #12 on: October 08, 2010, 04:36:08 pm »
The bad return causes problems other than what can be fixed with giving it a value if it is blank. So doing this with script is only fixing part of it, which in practice fixes nothing. I do know, however that I get the error regardless of processor load. So I think you are on the right track Snowman.
It's good to hear from you again. Looking forward to that brain of yours. Good luck man.
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
Re: hal blank answers still error even with script to stop it need help
« Reply #13 on: October 08, 2010, 08:45:10 pm »
Is the database completely shutting down when this error occurs or is this unique? If there is a way of issolating the errors then it should be possibly to correct it. Where did you find the error you fixed? Can you send me a picture or something that will show it.

If there is a massive database error issue or if there is one particular function giving us problems then that would be great to know.
Live long and prosper or die trying.

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Re: hal blank answers still error even with script to stop it need help
« Reply #14 on: October 11, 2010, 10:18:51 am »
Well i am very glad that their are people working on this , as this hal blank answer problem is something that definitely needs to be fixed  :o ever what man or women can get this problem solved will be a great person in many peoples eyes , i to have looked at it and tried to trace it down in the debg area and looked at ech set of responses and it comes up with just a blank response without an error i to think the programers missed something in the program allowing it to do this instead of giving an error that people could trace down .