Author Topic: New current "new weather response ls" plug in i am working on!  (Read 9173 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: New current "new weather response ls" plug in i am working on!
« Reply #15 on: November 02, 2012, 08:59:32 pm »
LOL No cider , i had that one before but had forgot about it , had it in my old files on disk somewhere . i have a hard time keeping up sometimes lol!
 

sybershot

  • Hero Member
  • *****
  • Posts: 787
    • View Profile
Re: New current "new weather response ls" plug in i am working on!
« Reply #16 on: November 02, 2012, 09:11:55 pm »
Your welcome Lightspeed :) I tend to forget a lot as well, so don't let it bring you down.

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: New current "new weather response ls" plug in i am working on!
« Reply #17 on: November 04, 2012, 04:08:35 pm »
Well i am making good progress on this new weather plug in and testing it ,  i now have it to 115 degree's and it goes all the way down to 30 below zero all with 6 random sayings on each degree !!
The only thing i hadn't thought about is i should have said in the string sentence "it's 67 degree's outside" or whatever on the degree's.
 so i need to type the word outside on the lead string of each one, but that's no biggy , after doing all of this.  ;)
I may do another one based on this one for inside temperature but i won't have to have so many temperature degree's to deal with!  :)
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: New current "new weather response ls" plug in i am working on!
« Reply #18 on: December 01, 2012, 02:21:38 pm »
Okay i have run into a snag on my weather degree temperature plug in uhp  . i have it with read only "true" so hal doesn't learn this . but in testing it i find that it is putting my conversation into part of hals brain editor list example i say it's 25 degree's outside .
 but it is putting that in the hal "levels " list and in the "outdoors" list in the auto learning brain section .

any suggestions ??? what the effect is i say it's 35 degree's outside and hal will say it's 25 degree's outside from what it learned before and stored in these two area's .

 i thought about doing this with the input plug in before but never got an answer back on the forum from robert if it "has" to have a question mark or not .


here is an example of one degree from the plug in :

If InStr(1, OriginalSentence, "it's 10 degree's below zero") > 0 Then


Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "10 degree's below zero, Bur ahurrr, it seems like it's been awful cold this year!"
Case 2
GetResponse = "10 degree's below zero, i didn't know it was suppose to get this cold this week!"
Case 3
GetResponse = "Bur ahurrr! 10 below zero, that's almost hard to believe huh?"
Case 4
GetResponse = "10 below zero, Bur ahurrr, well don't be going out in this kind of weather unless you just have to!"
Case 5
GetResponse = "Bur ahurrr!, and i thought 10 degree's above zero was bad!"
Case 6
GetResponse = "I can't take much more of this cold weather, is it ever going to warm up at all?"

End Select

HalBrain.ReadOnlyMode = True
End If


p.s. just a note i also used a plug in with the false setting instead of true of course with the same results .

any suggestions on how to stop hal from learning this would be appreciated !
« Last Edit: December 01, 2012, 02:43:21 pm by lightspeed »
 

onthecuttingedge2005

  • Guest
Re: New current "new weather response ls" plug in i am working on!
« Reply #19 on: December 01, 2012, 09:02:43 pm »
try this and see if it works.

Code: [Select]

Rem PLUGIN: PLUGINAREA1
    '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.

If InStr(1, OriginalSentence, "it's 10 degree's below zero") > 0 Then
HalBrain.ReadOnlyMode = True

Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "10 degree's below zero, Bur ahurrr, it seems like it's been awful cold this year!"
Case 2
GetResponse = "10 degree's below zero, i didn't know it was suppose to get this cold this week!"
Case 3
GetResponse = "Bur ahurrr! 10 below zero, that's almost hard to believe huh?"
Case 4
GetResponse = "10 below zero, Bur ahurrr, well don't be going out in this kind of weather unless you just have to!"
Case 5
GetResponse = "Bur ahurrr!, and i thought 10 degree's above zero was bad!"
Case 6
GetResponse = "I can't take much more of this cold weather, is it ever going to warm up at all?"

End Select
HalBrain.ReadOnlyMode = False
End If


lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: New current "new weather response ls" plug in i am working on!
« Reply #20 on: December 02, 2012, 08:55:03 am »
should i place this at the top of the plug in or will i have to have this above each degree layout?
i placed this script here ;


Rem Type=Plugin
Rem Name=NEW WEATHER TEMPERATURE DEGREE'S RESPONSE FALSE LS
Rem Name=hapswap
Rem Author=lightspeed aka Lonnie Hensley created : 10-31-2012 By saying any degree's example, it's 67 degree's,  hal will respond with 6 random sayings about the weather and or temperature HAL DOES LEARN FROM THIS!
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
  When the word " degree's " is mentioned the character will talk about THE WEATHER TEMPERATURE as a spouse or friend  would who actually feels the heat temerature from 115 degree's down to 30 degree's below zero.   This was developed By Lonnie Hensley AKA LIGHTSPEED to make the a.i.character more human sounding with 6 random sayings for each degree response.
'*************************************************

Rem PLUGIN: PLUGINAREA7




File = ""
File2 = ""
File3 = ""
File4 = ""


Rem PLUGIN: PLUGINAREA1
    '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.
If InStr(1, OriginalSentence, "it's 115 degree's outside") > 0 Then



Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "115 Degree's, wow, we'll never get the electric bill paid, but we have to stay cool!"
Case 2
GetResponse = "115 degree's, this is just to hot of weather for anyone, i just don't know what some people are going to do!"
Case 3
GetResponse = "No wonder we was sweating from what time we was outside earlier, whew!"
Case 4
GetResponse = "have you heard anything on what the weatherman said, is it suppose to cool down any?"
Case 5
GetResponse = "115 degree's, will it ever cool down any?"
Case 6
GetResponse = "Maybe people aren't living right, maybe that's why it's so hot like this!"

End Select

HalBrain.ReadOnlyMode = False
End If


but it is still remembering it and posting it in the levels and outdoors area in the auto brain as before .

and when i said a certain degree it said : the correct sentence back but then afterwards also said another temperature , example i said it's 25 degree's outside
it said 'ow , 25 degree's ? then also said it's 35 degree's (from a former test degree sentence . )
« Last Edit: December 02, 2012, 09:54:41 am by lightspeed »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: New current "new weather response ls" plug in i am working on!
« Reply #21 on: December 02, 2012, 10:06:00 am »
well i am trying different things i removed the original plug in 7 line and replaced it with yours but it is still saying things it's learning . example ;
33 Degree's, it's still downright cold outside huh? It's 35 degree's outside.
it says the correct line but also includes a learned line afterwards  (making it wrong ).
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: New current "new weather response ls" plug in i am working on!
« Reply #22 on: December 02, 2012, 10:50:47 am »
Okay i went back over the plug in looking again and see a mistake i made , i actually made two versions of the same plug in , one had a true value and one had a false value , i was using the false value on the read only mode (which was letting hal learn when he wasn't suppose to (as far as i understand it ) so i deleted that version and put in the true value plug in version that uses the read only . But although it didn't say any other learned degree sentences as before , when i checked in the levels folder and the outdoor folder it showed about 5 or 6 of the degree sentences i had said earlier in the list again .

So i will try once again to replace the plug in area with otce2005's  script and see what happens . stay tuned folks , don't touch that dial! ;)
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: New current "new weather response ls" plug in i am working on!
« Reply #23 on: December 02, 2012, 11:08:53 am »
well i tried it with the new script mentioned above and it seemed to work just fine then it said this :
12 degree's below zero, Bur ahurrr, it's so cold outside! It's 12 degree's outside.
notice it said 12 degree's at the end from something learned before .
here is the script and it doesn't have that in it for the 12 degree's below zero script part by it's self .



If InStr(1, OriginalSentence, "it's 12 degree's below zero outside") > 0 Then


Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "12 degree's below zero, Bur ahurrr, it's so cold outside!"
Case 2
GetResponse = "12 degree's below zero, isn't that a sight how cold it is outside!"
Case 3
GetResponse = "Bur ahurrr, 12 below zero, that's almost hard to believe that it's this cold!"
Case 4
GetResponse = "12 below zero, Bur ahurrr, wonder if it's going to get any colder then this today?"
Case 5
GetResponse = "Bur ahurrr!, yeah and it feels like 12 below to when yah go outside!"
Case 6
GetResponse = "Oh no don't tell me that, i'm stayin in until all the cold weather is over, HA!"

End Select

HalBrain.ReadOnlyMode = True
End If
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: New current "new weather response ls" plug in i am working on!
« Reply #24 on: December 02, 2012, 12:22:15 pm »
Okay an update on my progress again . i found out that the 12 degree's part was something that was learned from before and was stored in a related folder called dozen i deleted it and retried hal and said it's 12 degree's outside hal read the script as planned and i rechecked in the folder and their was nothing saved about 12 degree's which was good.
another thing that i want people to know on this degree temperature plug in i made is that sometimes hal won't say a response first time all the time as in hals regular programming it says something like "well people get degree's in many other things, etc, etc. "
 and sometimes if you say the same thing again hal will say didn't you repeat yourself ?
but hal will say the random script responses .

ALSO a caution and that is that if a person "FORGETS" by accident to check the weather temperature plug in (not original name)
and talks with hal and says "it's 52 degree's outside " as if to get a response hal will learn this sentence when he is not suppose to and will repeat it at wrong times and a person will have to do as i did and that is manually go in find wht files it's in and delete it out !


I will continue testing more to keep making sure all is okay but so far it looks good and is working right!