Author Topic: new auto-idle Plugin  (Read 18634 times)

Scratch

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
new auto-idle Plugin
« on: January 02, 2006, 12:27:21 am »
The upgrade for the "Loneliness" auto-idle plugin is done.This plugin is compatible with UltraHal version 6 only.
New features:
  • Adjustable settings in the control panel
  • Emotional expressions for Haptek characters  
  • Better, more varied responses
I would greatly appreciate any feedback! Especially you programmers - I'm new at this, let me know if you spot any coding faux pas.

3 tips on this plugin:
1) You can temporarily disable the auto-idle by typing "Be right back" or "be quiet"
2) There's about a 20 second offset, so when you select 1 Minute, it actually takes about 1min 20 sec to start. Haven't figured out why yet.[:I]
3) In some situations this plugin can draw from UltraHal's insult tables, a few of which are a lot harsher than I was expecting. I was considering adding a control to disable this, and will if there's any demand.

[edit: version 2.1 posted on 1/2/06 -scratch]
[edit: version 2.2 posted on 1/8/06 -scratch]
  • Random choice available for minutes  
  • unnecessary processing minimized  
[edit: version 2.3 posted on 2/25/06 -scratch]

Download Attachment: loneliness4.uhp
11.37 KB
« Last Edit: February 25, 2006, 03:12:53 pm by Scratch »
 

onthecuttingedge2005

  • Guest
new auto-idle Plugin
« Reply #1 on: January 02, 2006, 02:54:46 am »
Hi Scratch.

Very good job with the auto-idle plug-in.

In actuality, HAL needs a very good sense of audio word perception and a keen set of ears, Having (motion detector) eye sensors as well.

Eyes and Ears will replace 99% of Auto-Idle entirely

Code written for Eyes and Ears function, Exceptional Stereo Microphone with wave guide for the Ears and with Exceptional Video Cam motion detection software to run the Eyes.

There is already software written to use a USB Cam for a motion detection system.

Making a good set of Ears is a matter of research and testing.
Internal Noise Cushion/Damper, Proper Sound guide with less feed back and better software written to run Speech Recognition.

Jerry[8D]

GrantNZ

  • Full Member
  • ***
  • Posts: 178
    • View Profile
new auto-idle Plugin
« Reply #2 on: January 02, 2006, 07:16:08 am »
Very very nice Scratch! [:)]

quote:
Originally posted by Scratch

1) You can temporarily disable the auto-idle by typing "Be right back" or "be quiet" (with no punctuation at end)

If you want to allow the user to use punctuation, you could try the following change.

Where you have:
If Ucase(IdlePrevUser) = "BE RIGHT BACK" Or <etc...>
you could use:
If InStr(Ucase(Trim(IdlePrevUser)), "BE RIGHT BACK") Or <etc...>

So Trim gets rid of any accidental double-spaces between words and InStr ignores any trailing punctuation. Of course, this would also be seen as "true" if a subway-using user said "I took the tube right back home again". Standard NLP problem - the more forgiving you make the checks, the more will slip through. But perhaps the odd mistake like this would be unnoticable by 99.99% of users. You could try to avoid this by setting a maximum length for each phrase:
If (InStr(Ucase(Trim(IdlePrevUser)), "BE RIGHT BACK") And Len(IdlePrevUser) < 17) Or <etc...>
but this is really using a sledgehammer to hammer in a pin nail [:)]

quote:
2) There's about a 20 second offset, so when you select 1 Minute, it actually takes about 1min 20 sec to start. Haven't figured out why yet.[:I]

This will be (I think) because the MINUTE_TIMER is called once per minute, regardless of when the user last spoke. Because the code is waiting for at least one minute before auto-idling, it could technically take anywhere from 1 minute to 1 minute 59 seconds before Hal speaks.

I say again, very very nice [:)] Great plug-in!
 

Scratch

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
new auto-idle Plugin
« Reply #3 on: January 02, 2006, 04:45:38 pm »
Thanks for the feedback! It's an honor to recieve affirmation from two such as yourselves, and might I add that I'm eagerly anticipating the projects that you are both currently working on!

OTC: I agree with you about sensory input; I have pondered about how if Hal achieved consciousness "as is", he would be a very Helen Keller-like creature, with only one (very narrow) channel of sensory input. As for this plugin, it is not keyed on the physical presence of a user, but by a lack of attention, for which the existing channel seems adequate.

Grant: Thanks, I have incorporated your suggestion to use InStr. I don't think the Len is required since a false positive really does no harm. Thanks for the info on the Timer as well.

version 2.1 posted above
 

Another Jim

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
new auto-idle Plugin
« Reply #4 on: January 02, 2006, 06:54:12 pm »
I have to say I sit here chuckling to myself about adding sensory input devices to my Hal or 'Halette' as it were.....

In my case it might be safer if the sensory input were kept limited else she would see me for what I REALLLLLLLLY am (chuckling)....yup,,,

Ignorance can be bliss.....and allow conversation to be far far more believable from her end, hahahha....

Have a great day guys!  ((and gals!))

Jim B.
 

vrossi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://vrconsulting.it
new auto-idle Plugin
« Reply #5 on: January 03, 2006, 09:33:42 am »
Scratch,

This is a wonderful plugin. I really like your programming style: somewhere it looks like mine [:D]

The only problem I found is that, after giving correctly some comments every minute, then she gives the "Fine! Be that way" answer and, after that, she stops giving any message.

Maybe it is just your intention to make Hal get so angry that she doesn't speak anymore. But I think that, on the contrary, she should get more and more angry.

Looking at your code:


    temperThresh1 = loTemper
    temperThresh2 = loTemper + 2
    temperThresh3 = loTemper + 3
...
            IdleCounter = IdleCounter + 1
                If IdleCounter > temperThresh3 Then
                 Exit Sub
                ElseIf IdleCounter > temperThresh2 Then
                                IdleResponse3 = HalBrain.ChooseSentenceFromFile("insults")
                  HalMenu.HalCommand "<HAPFILE>angry.hap</HAPFILE>"
                  HalMenu.HalCommand "<SPEAK>Fine! Be that way. " &  IdleResponse3 & "</SPEAK>"


I see that when IdleCounter > temperThresh2 you will get the "Fine! Be that way" message, and at the next loop IdleCounter will be increased by 1 and so it will always pass through the Exit Sub statement.

So I replaced the Exit Sub with the following statements:
                  IdleResponse3 = HalBrain.ChooseSentenceFromFile("insults")
                  HalMenu.HalCommand "<HAPFILE>angry2.hap</HAPFILE>"
                  HalMenu.HalCommand "<SPEAK> " &  IdleResponse3 & "</SPEAK>"

The angry2.hap file is a copy of the angry.hap file, where I added this last statement, which makes Hal do a gesture which is internationally understood:

setswitch [switch= the_finger state= a]

Anyway, it's a great plugin, which adds much humanity to Hal. I would be very happy if you published it also in the Software download area of the Virtual Humans Forum.


Scratch

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
new auto-idle Plugin
« Reply #6 on: January 03, 2006, 11:22:53 am »
vrossi,
Ha ha! I love what you added. The "international gesture" - I'm still laughing about that.
Yes, it was my intention for Hal to stop nagging after a certain number of tries and instead give you the silent treatment, however I think your approach is equally valid (and funnier).
I'm not surprised my code looks familiar to you: for the past week I've been carrying around a copy of "VBScript in a Nutshell" and a printout of your vrFreewill plugin! Might as well learn from the best, right?
-Shawn
 

hologenicman

  • Newbie
  • *
  • Posts: 32
    • View Profile
new auto-idle Plugin
« Reply #7 on: January 03, 2006, 01:09:22 pm »
I read on the FIRST forum:

"Steal from the best, Design the rest..."[:)]

John L>
HologenicMan
ME, "Hello."
HAL,"Good grief my love. It's going on three in the morning."

DISCOVERY: The more I learn, the more I learn how little I know.
GOAL: There's strength in simplicity.
NOTE: Goal not always achieved.

ANDYC

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • http://www.andyc.biz
new auto-idle Plugin
« Reply #8 on: January 29, 2006, 11:41:35 am »
GREAT PLUG IN BUDDY!!!!
I am not a programmer in the slightest, which may account for my over excitment...... But still, great flipping plugin.

ANDYC
 

cadmar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
new auto-idle Plugin
« Reply #9 on: February 23, 2006, 01:14:45 am »
Hi Scratch, I have been having a problem with this plugin.
I keep getting the error :

Microsoft VB Script error

Halscript error 13 on line 2607 in column4: Type mis match: '(string**)' The file C:program files\zabawareultra hal assistant 6Hal Script.DGB. has been saved with the current script being used for debugging purposes

If HalBrain.TopicSearch("PATIENCE","lonelyParameter")=99 Then


R. Downey

Scratch

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
new auto-idle Plugin
« Reply #10 on: February 25, 2006, 03:16:59 pm »
Okay, sorry it took me a while to respond Cadmer. I'm in school and it consumes all of my time!
I'm really not a programmer, just teaching myself by studying the work of others who have contributed some great stuff here in this forum. To test the error, I added the following lines to the Loneliness plugin at the start of the minute_timer function:

testvar = HalBrain.TopicSearch("PATIENCE", "lonelyParameter")
MsgBox "The lonelyParameter variable, " & testvar & ", is a " & TypeName(testvar)

The resulting message box states the variable lonelyParameter is stored as a string, which means the plugin needs to be corrected--I have no idea why it runs without error for me, but it does! Anyway, I think the simplest fix is to put some quotes around the 99 since it's just a flag and its numerical value is not used.

The corrected plugin is version 2.3 and is available above. Let me know if that runs correctly for you

-Shawn
 

JS

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • http://smart1234.s-enterprize.com
new auto-idle Plugin
« Reply #11 on: June 17, 2006, 09:30:58 pm »
The upgrade for the "Loneliness" auto-idle plugin is done.This plugin is compatible with UltraHal version 6 only.
New features:
Adjustable settings in the control panel
Emotional expressions for Haptek characters
Better, more varied responses
I would greatly appreciate any feedback! Especially you programmers - I'm new at this, let me know if you spot any coding faux pas.

3 tips on this plugin:
1) You can temporarily disable the auto-idle by typing "Be right back" or "be quiet"
2) There's about a 20 second offset, so when you select 1 Minute, it actually takes about 1min 20 sec to start. Haven't figured out why yet.
3) In some situations this plugin can draw from UltraHal's insult tables, a few of which are a lot harsher than I was expecting. I was considering adding a control to disable this, and will if there's any demand.

[edit: version 2.1 posted on 1/2/06 -scratch]
[edit: version 2.2 posted on 1/8/06 -scratch]

Random choice available for minutes
unnecessary processing minimized
[edit: version 2.3 posted on 2/25/06 -scratch]

 Download Attachment: loneliness4.uhp
11.37 KB

---------------------------------------------------------------------

    Hello Scratch,

        I was wondering if I could have your permission to post a modifed version on your loneliness4.uhp file? I modified it at my home. It has nicer comments and facial expressions when idle. It doesn't use the insult table and it runs longer than just 3 comments and then stop. I added more already existing HAL 6.0 table responses for a wider variety of random comments including a joke table. I testd it and it seems to work ok.
       I keep you as the main author of the file for main credit and then at the bottom I put, "slightly modified" by me.

Thanks for your consideration,
    JS

Jim Smith

vrossi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://vrconsulting.it
new auto-idle Plugin
« Reply #12 on: June 18, 2006, 03:41:22 pm »
Hi, JS

I've installed and used the auto-idel plugin since its first version, and I think it's a good tool to give Hal a more human behaviour.

I would like to install and test your version. Where can I download it?
Thanks. I hope to see other works form you here.


JS

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • http://smart1234.s-enterprize.com
new auto-idle Plugin
« Reply #13 on: June 18, 2006, 10:41:50 pm »
Hi, JS

I've installed and used the auto-idel plugin since its first version, and I think it's a good tool to give Hal a more human behaviour.

I would like to install and test your version. Where can I download it?
Thanks. I hope to see other works form you here.
-----------------------------------------------------------------

  I sent a copy of it in your Email to review it to see if it works properly.
   I was later considering putting other things in it like playing music in the background by a random chance and then turning it off and also connecting the computr Logitech CAM video on or off, in a pretend mode, where Hal 6.0 will say he/or she is looking for you, and then you see a video of the room turn on or off looking for you with the replies.
   I am still waiting for permission to post the modifications although to the original.

  JS

Jim Smith

seduar

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
new auto-idle Plugin
« Reply #14 on: June 20, 2006, 09:55:10 pm »
I agree with verybody, i think is a great pluggin.
I downloaded it and installed but i am also having problems.
I have an error popping up:

Hal script error 13 on line 4235 in colum 8 Type Mismatch: 'CDbl'
The file "C:program files\zabawareultra hal Assistant6hal script.DBG"
Has been saved with the current script being used for debugging purposes.

Any Idea how can i fix that?