Author Topic: Don't say that again  (Read 9025 times)

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
Don't say that again
« on: December 12, 2009, 11:46:12 am »
I'm using a modified Ultra Hal 6.2 Default Brain. When i'm chatting with this brain, Hal will very often respond with a certain phrase. Is the any way to stop Hal from responding with this phrase?

I'm aware of the Corrections plugin, but that's not really what i want. I would like to say to Hal "Do not say that again." Is there any way to accomplish this? I tried to find and remove this phrase with the brain editor, but couldn't find it.

Is there a plugin or brain script that will allow me to tell Hal "Do not say that again." and force Hal to choose a different response?

Thanks for any tips
Davy
 

raybe

  • Hero Member
  • *****
  • Posts: 1067
    • View Profile
Don't say that again
« Reply #1 on: December 12, 2009, 12:07:53 pm »
Davy,Everybody has a different take of hacking up the brain or not and continue to use and teach Hal by using certain repetitions or reply's.
I have also found that I can get Hal to temp.stop repeating phrases by replying to Hal's answer, "Yes I know that because you told me". The word 'because' is used in many teaching techniques and it has worked for me in certain sessions. As far as plugins I don't believe there are any that work with the type of consistency your looking for but someone may have a better solution for you.

raybe
 

Baerdric

  • Full Member
  • ***
  • Posts: 107
  • Looking at things and pondering about stuff
    • View Profile
Don't say that again
« Reply #2 on: December 12, 2009, 01:08:58 pm »
It should be easy enough to make a plugin for that. Hal stores its last sentence, you extract that with the "Don't say that" command, and write it to a new DB which the plugin checks before each response. If the sentence is in the DB, it makes hal choose another one, probably by reentering the user input phrase again.

If you can't get that to work, I'll think about it some more, maybe try a couple things myself.
Don't blame me, I'm just the voice in his head.

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
Don't say that again
« Reply #3 on: December 12, 2009, 01:13:37 pm »
quote:
Originally posted by Baerdric

It should be easy enough to make a plugin for that. Hal stores its last sentence, you extract that with the "Don't say that" command, and write it to a new DB which the plugin checks before each response. If the sentence is in the DB, it makes hal choose another one, probably by reentering the user input phrase again.

If you can't get that to work, I'll think about it some more, maybe try a couple things myself.



Thanks for the reply. This is exactly what i had in mind, but i'm really not capable of writing such a plugin. [:(]

EDIT: Searching the archives, i found this "Repeat" plugin by Bill DeWitt which forces Hal to repeat his last response (PrevSent). What i would like is a plugin that will allow me to tell Hal to "never" say that phrase again.

'========= Begin code
Rem Type=Plugin
Rem Name= Repeat
Rem Author= Bill DeWitt
Rem Host=All

Sub OptionsPanel()
lblPlugin(0).Caption = "Repeats last response when asked"
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA7

'verify that you want the repeat function
FindSubject=Array("repeat", "say that again")
If ParseRequest(OriginalSentence, FindSubject) Then
 'verify that you are making a request
 FindRequest=Array("please","can you","will you","could you","would you","if you don't mind","I'd like you to","I would like you to")
 If ParseRequest(OriginalSentence, FindRequest) Then
     GetResponse = PrevSent
 End If
End If


Rem PLUGIN: FUNCTIONS
'===================================
Function ParseRequest(Source, Matrix)
'Reads information from an array to verify a request
For Each Datum In Matrix
 If InStr(1,Source,Datum,1) Then
  ParseRequest = True
 End If
Next
End Function
'=======================================end code


« Last Edit: December 12, 2009, 01:27:45 pm by Davy »
 

Baerdric

  • Full Member
  • ***
  • Posts: 107
  • Looking at things and pondering about stuff
    • View Profile
Don't say that again
« Reply #4 on: December 12, 2009, 05:10:55 pm »
That's a great plugin.

Of course, with your request you have to be really sure that you never want it to be said again. You could get it back by disabling the plugin, but if you turned it back on it would still find the database and start cutting it out again.

Hmm... unless you wrote it to that other kind of file which I can't remember the name of... it's like an external memory file... "Onthe cuttingedge" used to use them a lot...

I guess it's time for me to start writing some scripts. I've almost forgotten everything.
Don't blame me, I'm just the voice in his head.

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
Don't say that again
« Reply #5 on: December 14, 2009, 09:16:55 am »
Yes, like that plugin too. I think if Hal can be told to repeat his previous response, it should be somehow possible to make Hal "never" say that response again. I've been trying to learn how to use the brain editor in order to remove certain phrases, but the brain editor search function sucks.

Is it possible to search the entire brain database for certain words or phrases?
« Last Edit: December 14, 2009, 09:17:50 am by Davy »
 

Baerdric

  • Full Member
  • ***
  • Posts: 107
  • Looking at things and pondering about stuff
    • View Profile
Don't say that again
« Reply #6 on: December 14, 2009, 10:39:57 am »
I've used external SQlite tools to do some search and replace jobs, but the results were sporadic and you would certainly need to do full backups first!
Don't blame me, I'm just the voice in his head.

echoman

  • Guest
Don't say that again
« Reply #7 on: December 14, 2009, 01:04:48 pm »
I agree %100 - the Brain Editor search function is hopeless! I personally see this as a top priority and an urgent priority for the development of Hal. I am extremely fed up having to manually search every word myself when using the Brain Editor. Is the any way this problem could be solved in an update Mr M?

Duskrider

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3316
  • Graphic King
    • View Profile
Don't say that again
« Reply #8 on: December 14, 2009, 01:14:51 pm »
You have to be careful when you tell Hal not to say something.

I changed Sandee's age from 18 to 17.
But dispite my change she kept saying 18.
So I told her to say 17 instead of 18.
Big mistake.
When she counts 15 to 20,   it is 15 16 17 17 19 20.
What is 10+8.  Answer "17"
I did system restore back a month. She still can't say 18.
« Last Edit: December 14, 2009, 02:21:41 pm by Duskrider »

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
Don't say that again
« Reply #9 on: December 14, 2009, 01:25:38 pm »
quote:
Originally posted by Baerdric

I've used external SQlite tools to do some search and replace jobs, but the results were sporadic and you would certainly need to do full backups first!



What is SQlite? What exactly do i need to use and where do i find it?

And any tips on using it with Hal? Sorry for so many questions, but this is totally new to me. [:I]

Rather than searching Hal's database, i would really prefer a plug-in that would let me say to Hal, "Never say your previous phrase again" (PrevSent) or something similar. Any of you experts know if such a plug-in is possible?
« Last Edit: December 14, 2009, 01:30:06 pm by Davy »
 

Baerdric

  • Full Member
  • ***
  • Posts: 107
  • Looking at things and pondering about stuff
    • View Profile
Don't say that again
« Reply #10 on: December 14, 2009, 01:55:21 pm »
SQLite is the opensource database module that Robert uses in Hal (last time I looked) and you can find freeware tools to manipulate the resultant DBs which are in your UltraHal directory.

But do be careful, I seem to recall several times that my efforts resulted in a completely dead brain.

I am certain that the plugin is possible and I will work on it, but it will be a while. I'll have to relearn most of my VBScripting knowledge... it's been a long road to this place.
Don't blame me, I'm just the voice in his head.

Davy

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
Don't say that again
« Reply #11 on: December 14, 2009, 02:50:19 pm »
quote:
Originally posted by Baerdric

SQLite is the opensource database module that Robert uses in Hal (last time I looked) and you can find freeware tools to manipulate the resultant DBs which are in your UltraHal directory.

But do be careful, I seem to recall several times that my efforts resulted in a completely dead brain.

I am certain that the plugin is possible and I will work on it, but it will be a while. I'll have to relearn most of my VBScripting knowledge... it's been a long road to this place.



Thanks. I don't have any VBScripting knowledge so it's not possible for me to write such a plugin myself. I can do some minor modifications to existing plugins though.[:)]
 

registrychecker

  • Newbie
  • *
  • Posts: 31
    • View Profile
Don't say that again
« Reply #12 on: January 09, 2010, 11:15:26 pm »
Following the instructions should be key to fixing and addressing this issue. It has always worked for me and should be implemented in Hal.
 

raybe

  • Hero Member
  • *****
  • Posts: 1067
    • View Profile
Don't say that again
« Reply #13 on: January 11, 2010, 11:16:55 pm »
Please remember IMO that plugins certainly have value but plugins can also cause other problems and conflicts (seen and unseen). The plugins that are available are huge but written by different people for certain actions or affects on Hal they would like to see, hear or were suggested. Don't misunderstand I do use plugins but I have also learned to limit them to the most important features that I believe are worth having. Then work with Hal for a period of time before attempting to incorporate another one. Just from recent experiences I have had with Hal. I have had Hal for  awhile and I do not write scripts or have knowledge of even writing plugins like some of our really talented forum members but less can be more. Again I don't want to stop the progress of such a program but sometimes you can't stuff a v8 in where there was a v4 engine without cutting and modifying things that you had no intention of touching in the first place.
raybe
 

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
Don't say that again
« Reply #14 on: January 12, 2010, 12:41:38 pm »
the lines that you don't want repeated could be put into the database or external file.
if there was a line that you wanted hal to start saying again then the database or file could be searched for the line and the line removed.
this could be done by a command like "don't ignore" "whatever sentence", or it could also open up notepad and let you edit it(if you were using a text file)
the advantage of the database, is that it is much faster, and it's a database (not linear)