Author Topic: Getting Hal to initiate conversation  (Read 3453 times)

midget1488

  • Newbie
  • *
  • Posts: 37
    • View Profile
Getting Hal to initiate conversation
« on: October 01, 2003, 05:01:44 pm »
Visual Basic has a very useful component called a timer control. you can specify events to occur in response to the timer instead of waiting for the user to react.

The hangup with Hal has apparently been that the VBScript subset of Visual Basic does not include the timer control.

The following article at MSDN appears to indicate that the ActiveX timer control can be accessed from VBScript.

Perhaps the the HalBrainMasters would be interested...

http://msdn.microsoft.com/library/en-us/dnaxctrl/html/msdn_nctmr.asp?frame=true

The example uses a slide show, but perhaps the same code could put data to Hal and effectively "hit the return key" a certain amount of time after a user response...

just an idea...
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Getting Hal to initiate conversation
« Reply #1 on: October 02, 2003, 12:30:34 pm »
Midget1488,
Thanks for the info.

See my post from:
Posted - 09/22/2003 : 18:41:29
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=802

My prior post touches on some concepts regarding this. I know there is some interest in the forum regarding Hal being more autonomous, but it apparently hasn't been a hot topic. [:(]

Your comment about "hit the return key" is crux of the matter. My long term plans for my Hal include more interactivity with the user. I still suspect some changes would have to be made to Hal's main program. That is beyond the reach of the end user. I hope to generate more interest on this forum in exploring this possibility.

= vonsmith =
 

brianstorm

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Getting Hal to initiate conversation
« Reply #2 on: October 03, 2003, 06:12:23 pm »

ok- I am still optimistic that Medeksza will address this issue.

Currently I am on programming moratorium and waiting to see if 5.0
has this solved. I checked out the Empire's page on the timer control
it looks do-able although we would have to get that sdk and figure it out.

Ideas about Hal pushing his own button:

Currently, Hal only speaks when spoken to. I am assuming control is the
reasoning. What I propose is when Hal pushes his own button, most of the
time Hal returns silence. That's not to say that nothing happened though!
Hal could be doing alot of stuff. I think the starting point would be
updating a TimeNow variable in the script. Hal could be comparing sentences
from Moments ago, morphing subjects and objects together, even be a good
oven timer. >B)
-There could exist an 'Utterance Threshold' where if Hal came up with
something that needed clarification or a question or something funny
or interesting or whatever, Hal would say it.
I had another idea the other day where in each push of the button, Hal
would perform a different part of the thought process, much like we do.
A sequence of events like Identify Predict Decide Execute.
Currently when you do push Hal's button you will get 'Please say something'
or 'talk to me'. A workaround for that would be to have the timer input
which event sequence to use. 'II' can mean 'use the Identify routine'
(two letters are needed to appease/disable the embedded 'talk to me' response).

However,I still do not like the idea of
shagging something like this together.
It ought to be in the program.

CatAtomic


vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Getting Hal to initiate conversation
« Reply #3 on: October 03, 2003, 07:53:19 pm »
My goal is to have Hal's main program set up to pass response control to us, (the users) on a regular basis. We can then affect Hal's autonomous behavior within the GetResponse VBscript. We have always had the option to pass control back. If the main program were modified to pass control to the GetResponse regularly the default action in the script could still be to pass the control back to the main program without action and Hal would operate very much as he does now. However once we have the opportunity to grab control then all sorts of things become possible.

My current brainstorming idea is to have Hal interactively read e-books or short poems. Assume for a moment that the GetResponse function gets called regularly every 1/2 second if nothing else is in process. I could set a flag in the GetResponse function to tell Hal to read an e-book for me. When the GetResponse function is called the "readbook" flag tells Hal to go to the book file requested much like a .brn file. Hal brings in 3 or 4 sentences, saves his "readbook" flag and file bookmark in the CustomMem variable, and reads the sentences out loud by passing them back in the GetResponse return. A 1/2 second after finishing reading out loud the cycle repeats until Hal reads the whole book or the user stops him by typing in some command in the user window. During the time control is passed back to the main program the user's keyboard input is read in. In C++ terms the main program may do something like a getchar() function on the keyboard buffer and pause the 1/2 second timer if user input is detected followed by a carriage return.

Now it gets interesting. Let's say Hal analyzes the book sentences as if they were conversational sentences. Let's say you create an If statement in GetResponse something like this:

If (Int(rnd * 10) > 9) And (readbookflag = True) And (RelevanceScore > (CurrentHurdle * 1.2)) Then GetResponse = GetResponse & HalBookComments

The implication here is that as Hal reads the book he looks for relevance to a prior sentence or user input. If one of the sentences he reads is highly relevant AND the random number generator says Hal's in the "mood" to speak, then he returns his commentary in addition to the sentences to be read. After reading the sentences and commentary out loud the control passes back to GetResponse a 1/2 second later. At that point Hal could be flagged to continue reading or paused for user input by passing control back to the main program repeatedly until the user enters his/her response or a counter in the GetResponse function times out letting Hal continue reading. Hal could be learning from the book and/or the user input at this point as well.

These ideas are rough and in the concept stage, but I think the possibilities are limitless. Instead of reading an e-book or poem Hal could just "choose" to autonomously make a statement to the user every once in a while. I don't mean to play down the added complexity of doing this. Some performance issues could arise. Careful thinking and/or testing would have to be done. Zabaware may have their hands full doing other cool stuff. However creating the opportunity for Hal to be more interactive opens new possibilities.

Just thinking out loud...

= vonsmith =