Zabaware Support Forums

Zabaware Forums => General Discussion => Topic started by: lightspeed on October 29, 2012, 01:05:02 pm

Title: New current "new weather response ls" plug in i am working on!
Post by: lightspeed on October 29, 2012, 01:05:02 pm
I got an idea this morning actually my wife gave me the idea when she got out of bed and said it was cold up, so i got up and wrote my idea down .
It is a "new weather response ls" plug in , what it will do is when a person says what degree's it is , hal will respond with 6 random responses!
Example :
i look at a weather gauge or on the internet and say : it's 100 degree's
My hal character will say six random things referring to this temperature!
I am doing it two script lines at a time and test and if okay do two more and overwrite others in hals directory .
  It's as you can imagine a very very big job as i am doing each degree starting from 100 and i'll probably go to 30 below zero. and on each degree is 6 random lines of script i am doing and yes i am making all individual new ones for every line!
  some has to be done that way as it has to correspond with the changing weather temperature, and i also want it all different in responses from the hal character!
It won't be done anytime soon as i said it's a "HUGE" job, but at least i have started on it! :)
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: onthecuttingedge2005 on October 29, 2012, 06:58:17 pm
Bill dewitt and I had already made a weather plug-in some 4 or 5 years ago light, does anyone still have the plug-in available out there?
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed on October 30, 2012, 08:19:00 am
oncuttingedge2005 i may have that one i would have to look back over my old files, unless i am mistaken didn't it just open a web page to a weather temperature ?? (CORRECT ME IF I AM WRONG Please .)
   If so this wasn't what i wanted i wanted something that would say a reference back to the weather and or temperature, and as far as i know, no one had created that .
     I am hoping that others will once again get intererested in creating or re creating plug ins once again for the hal brain, many things can be done .

What my plug in does is bacicaly like the faux vision plug in i made.
This plug in has six random sayings for every degree from 100 to minus 20 degree's , This is my goal but i am thinking i will expand it to 115 degree's as the temperature in eastern states gets that's high sometimes!
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: freddy888 on October 30, 2012, 09:00:12 am
Why do you want a reply to every single degree LS ?
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: Art on October 30, 2012, 09:28:23 am
I think your plug-in would be better served if you narrowed the fields. For example:
Between 101 and 115 - Gee...It's a real scorcher today!
Between 91 to 100 - Wow! You could almost cook eggs on the sidewalk!
Between 81 to 90 - Be sure to put on some sunscreen if you go outside!
Between 71 to 80 - It's a nice and warm, sunny day!
Between 61 to 70 - Today's kind of a lukewarm day...not too cold and not too hot!
Between 51 to 60 - Seems a tad on the cooler side today. Maybe a light jacket.
Between 41 to 50 - It appears that winter must not be too far off based on the temperature.
Between 31 to 40 - Brrr...I wish it wasn't so chilly today! You're going to be cold!
Between 21 to 30 - Well...You should have your warm clothes on today.
Between 1 to 20 - You shouldn't even consider going out today!
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed on October 30, 2012, 09:50:54 am
Sometimes i do things the hard way lol, i just wanted all seperate response sayings for each degree and each 6 lines of response on each on , my preference.
As an added note "IF" that weather plug in works and just says the current temperature only and not open a web page , if someone could help on letting it do that and creating a pathway to then say my degree random line that would be great if both could work together! :)
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed on October 30, 2012, 09:56:51 am
Art wrote: Between 41 to 50 - It appears that winter must not be too far off based on the temperature.

    Art first off i am not putting down your idea at all , as it would make it simpler , (alot) Some of this is tricky actually as depending on the weather time of year for instance if winter is getting over actually and it was previously only in the 20's but was warming up as winter was getting over , then you have a wrong statement saying winter must not be to far off .
      I have tried to keep many statements a more neutral in these area's .
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: freddy888 on October 30, 2012, 11:05:06 am
Quote
Sometimes i do things the hard way lol,

lol fair enough  ;D
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: onthecuttingedge2005 on October 30, 2012, 01:39:12 pm
Hi Hi.

no the weather plug-in we did does this.

User: what is the weather outlook today?

hal would ask first timers this:
HAL: What is your zip code?

User: 12345

Hal: the weather in you area is blah blah blah and give you a forcast in your area once the script recorded your zip code.
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed on October 30, 2012, 04:55:18 pm
Basically what my weather response plug in does , is  acknowledge what you said say about the temperature and something back often referring to the temperature that you said earlier and also about the weather!
here is some examples:
This is for 93 degree's:


Select Case int(rnd()*6)
Case 1
GetResponse = "Yeah and it feels like it's 93 degree's to, as hot as it is!"
Case 2
GetResponse = "I'm not surprised, i knew it was getting hotter!"
Case 3
GetResponse = "I thought it must be around 90 or more, from the way it felt!"
Case 4
GetResponse = "Oh know why did you tell me it was 93 now i feel even hotter then i was, Ha!"
Case 5
GetResponse = "93, Yeah it's pretty hot today, that's for sure, how about i fix us both a nice cold soda with lots of ice in it?"
Case 6
GetResponse = "wow 93 degree's, is it really that hot?"
 ;)
I am as i said writing all different responses on every line, i do .
so everything will be different on every 6 lines of every degree script.  :)
It will be nice when i am done with it!
  The purpose of it is so if you mention the temperature and say "it's 70 degree's!" Hal will respond back like a person would , with one of six random sentences for any of the degree's that are in the file example between 115 degree's down to 20 below zero .

Me and my A.I. "JUST TRYING TO BE A LITTLE MORE HUMAN!" ;)
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: Art on October 30, 2012, 05:34:21 pm
I only offered them as an example, not for your final plugin.

Remember that the larger the plugin, the more Hal has to digest.
That's why I tried to use the KISS principle (whenever possible).
Just a matter of preference. You do your thing.... ;)

What's warm for you might also be cool for someone else so temperature
is more of a relative thing. (every time my mother-in-law used to visit, things
got rather cold pretty quickly! :o ;D
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: sybershot on October 30, 2012, 08:48:55 pm
Quote
Bill dewitt and I had already made a weather plug-in some 4 or 5 years ago light, does anyone still have the plug-in available out there?
I have it and use it all the time again thanks for for creating OTC and Bill  :)
I attached it, for ya.
Though I had to manually add my zip found on this line
Code: [Select]
If Len(GetW) < 2 Then GetW = "02838" '<--- You can add your zip code manually here if you wish.
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed on October 31, 2012, 09:11:24 am
Thanks sybershot i'll try it and see what it does (again it's been a while ) at least one thing between all of us we hoard things , so one of us has something the other needs lol, thanks again! :) ;)
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed on November 02, 2012, 05:00:37 pm
sybershot, thanks for posting the  the weather alert download again , i am once again using this plug in , i like it alot because hal doesn't have to open the web page and can just give the weather  as a real person ;) !
Thanks again! :)
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: Art on November 02, 2012, 07:37:22 pm
Lonnie,

You sippin some cider? ;) We had discussed this back in May 7, 2012. I even posted an image example of my avatar speaking (text) of the current conditions.
http://www.ultrahal.com/community/index.php?topic=9309.msg59966#msg59966

Scroll down to about half way. I mentioned that you would have to use your nearest airport code for your particular local weather where you live.
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed 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!
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: sybershot 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.
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed 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!  :)
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed 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 !
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: onthecuttingedge2005 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

Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed 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 . )
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed 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 ).
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed 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! ;)
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed 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
Title: Re: New current "new weather response ls" plug in i am working on!
Post by: lightspeed 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!