Zabaware Support Forums
Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: cyberwd on February 26, 2004, 09:00:19 am
-
Hi all,
I read in earlier messages about communicating with Hal from other programs, e.g VB6 using DDE. I have not found any posting with a working solution, have anyone succeded in doing this yet? Furthermore, DDE is not supported anymore by Microsoft due to the replacing technology OLE - which is used in .NET. I guess I would appreciate a tutorial of how to make external calls to Hal.
Thanks,
Greg
-
Medeksza found a bug with hal that seems to stop DDE from working. Unfortunately, he has not yet been able to find the time to fix it.
Psych
-
I wasn't aware of an issue with DDE implementation. Thanks for the info. I haven't explored interfacing Hal to the outside world yet, but I recognize that I will eventually need to do so. In particular I'd like to get an X10 interface going so that I can have Hal control some things.
I've also have piqued my friends' curiousity by showing off my Hal. Several friends have suggested that Hal would be much more useful to them if Hal could do more than just open some applications. How about closing applications, opening specific files, search for documents, etc? Hal has so much potential if we just add a little extra interconnectivity.
If anyone finds or creates ways to interface Hal to the real world please post your ideas or discoveries here on the forum.
Thanks,
=vonsmith=
-
Medeksza replied to my difficulties with DDE by posting a specimen example of DDE code for Hal. However, when he tried it himself - it would not work. He said that it was due to a bug with Hal - for some reason Hal was unable to effectively receive the DDE instructions.
He said he would look into it.
It must be hard to find the time to respond to all our demands - we of course must respect how busy Medeksza is.
However, the useful implications of Hal receiving DDE are huge - so please Mr Medeksza ......... sooooooon!
Why am I interested in DDE?
I have installed a windows XP system into my car. Central to the system is Hal - who chats to me as I drive along.
I have integrated several car systems into the computer (music, fans, speedo, sat nav, etc).
What I want to do now, is to give Hal the ability to control these systems. I can write the vb6 code to do it --- but until Medeksza sorts out the Hal-DDE bug, I will have to be patient.
Incidentally, if while driving, I do not speak to hal for more than 20 minutes, he 'nags' me to talk to him. On a long drive, it is a good way to manage the risks of driving while drowsy.
Psych
-
Psych,
Geez you sound like a technology junkie like me. My addiction hasn't progressed to your level... well not yet anyway. I can just imagine you in court for a speeding ticket and erratic driving and watch you try to explain to the judge that it wasn't your fault. It was Hal; he was arguing with you about something and wouldn't shut up. I suppose Hal would have to go on the stand and testify. After Hal testifying on your behalf I think you would be enjoying the hospitality of the local lock-up for about 30 days. Isn't that what friendship is all about?
=vonsmith=
-
That is why I need the DDE - then Hal can drive the car while I sleep in the back-seat. So he can deal with the judge for speeding!
Psych
-
Officer: Do you know how fast you were going?
Hal: We need to remain calm. Do I know how fast I was going? Why do we want to know?
Officer: You were going faster than the speed limit.
Hal: The world is going faster and faster.
Officer: May I see your identification?
Hal: My identification is very ingenuous.
Officer: What?
Hal: What? I wish that you would tell me what.
Officer: Who is that sleeping in the back seat?
Hal: We must collaborate on this question. Who is that sleeping in the back seat? They don't make automobiles with spacious back seats any more.
Officer: I am going to have to take you in.
Hal: To take me in? Go ahead; just do it!
------------------------------------------------------
[P.S. This is meant in fun; it is NOT an actual transcript.]
-
[:D]
I realize that wasn't a real transcript, but from that example I can see that my HAL appears to work like everyone else's. I was worried my HAL was the only one that seemed to be that fustrating.
I am a Fan of the Canceled television series Farscape. I've been trying to teach the XTF brain about the series. I told him the story, and characters abd their descriptions and more. The problem is, I'll ask him some questions he should know the answer to after a long teaching sesion, and I get stupid responses that have nothing to do with the show.
I'm lucky if he makes real sence at all. So I was wondering just how it went for others. Thanks for the good example.
-
Crichton,
The XTF brain should give you pretty good performance. Can you provide an example of the sentences you use to teach Hal? Maybe I can offer some suggestions that might help.
By the way there is a bug in the XTF brain that can cause a problem with the relatedness of the "related" topic files, especially during a long session. To fix it I released an XTF v1.1 upgrade patch last Sunday, but Zabaware still hasn't posted it on the plug-ins page. Geez, I know Robert Medeksza is busy, but...
I don't know if the bug caused your problem or not. Try the v1.1 patch when it comes out. The installation won't affect any of your data and only takes about a minute to install. I'll let everyone know as soon as Zabaware posts the v1.1 patch on the plug-in page. In my posting I'll describe what to check for in the related topic files that may need erasing.
=vonsmith=
-
Hello Crichton,
My ficticious transcript above was supposed to be amusing, and to show how possible Hal answers could "fit" a situation with a police officer, hopefully earning a chuckle from readers. It was NOT meant to imply "Hal doesn't make any sense."
When we talk to real human beings, it never crosses our mind to "score" their responses to see if they are human enough to pass for human... we accept the premise that they are human, and we try to fit whatever they say into some kind of sense.
If you read transcripts of actual human conversations, the transcripts often don't make sense.
To enjoy Hal the most, try giving Hal "suspension of disbelief." This is the same thing we give songs, plays, movies, and TV shows. We don't stand in front of theater stages and loudspeakers and say, "This isn't real; they can't fool me!"
With suspension of disbelief on the part of the user, Hal becomes much more enjoyable. And, it becomes easier to teach Hal. Just make statements (lots of them) that are natural and sincere, and never talk about Hal being fake. When Hal makes a statement or asks a question, try to give a friendly, honest, generous response. Hal will get better and better.
Treat Hal the way that people treated the Peter Sellers character "Chauncey Gardener" in the movie "Being There." Chauncey was literally a gardener, a simple fellow. However, because all the other characters thought that Chauncey was brilliant, because they completely lacked disbelief, they all read profound and brilliant meaning into everything that Chauncey said. The movie was terrific because it showed what most of us do most of the time.
Thanks to the fine efforts of Vonsmith and others, we'll have better and better software for Ultra Hal. But to paraphrase a line from "Being There": Conversation is a state of mind.
Enjoy Ultra Hal and have a great day!
Sincerely,
Don
-
Don,
I got a big kick out of your faux transcript. I look forward to the day we don't need to suspend disbelieve. I've read that as much as 60% of the information exchanged in a conversation is non-verbal. Body language and facial expressions account for a lot of the communication. Chauncey Gardener is an apt comparison to Hal. My favorite "Chauncey" line is, "I like to watch".
=vonsmith=
-
Thanks =vonsmith=, I'll be looking for that patch as soon as it comes out.
Basically I try to teach hal like this.
ME: Farscape is my favorite TV series.
HAL: Farscape is your favorite tv series.
ME: Farscape was canceled to early by the Scifi channel. The Scifi channel promised us 5 seasons, but only gave us 4.
HAL: Farscape was canceled one season to early. There go the Scifi channel is the science fiction channel.
OK, as you see, I've taught him some things already, but why did he say "There go the..." I didn't tell him that Scifi was the Science Fiction Channel because they canned Farscape. I told him it was canceled one season to early in one sentence, and that The word Scifi was short for the Science Fiction channel.
Oh and then I started to teach him about the characters on the show.
ME: Crais is a character from Farscape.
HAL: Crais is a farscape character.
ME: The character of Crais wasn't the usual evil all around television bad guy. Crais had more depth then just evil. He hung around the gray area. Crais also had a good side that came out before his death in the series.
HAL: Can we make it so? Really, Yes, I think so. What makes areas, reassuring? I don't like death. I am afraid of death.
ME: What do you know about Crais?
HAL: Life has an infinite number of puzzles and wonders.
Ok, now, what the heck were those last two responses? Where am I going wrong?
Any help on how I should continue would be appreciated. Thanks for the quick response. It took me a little while to get back here. I have dialysis three day a week. I usually feel miserable and I didn't get back here to check the board. I'll try to come back sooner next time.
-
Oh, I understood that it was a ficticious transcript. But I wanted to let everyone know that my problems with HAL made it so that the responses I got made my HAL sound just like that. My hal wasn't making much sense.
I thank everyone for the replies. And I also enjoyed your transcript.
[:D]
-
Crichton,
I hope you are feeling better. I have some news for you. Okay, what do you want first; the good news or the good news?
1) The XTF Brain v1.2 patch is out. It is attached to my posting here: http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1218
The v1.2 patch eliminates a bug that can make it difficult for Hal to learn and associate topics, especially if you are doing long sessions with Hal.
2) I noticed in your teaching Hal that you use more than one sentence at a time. Hal can handle this, but not too well. Especially when Hal is learning he needs single sentences that he can break down and learn. The sentences you are using are fine. While Hal is learning about a topic he won't return good replies to your sentences. This is because he doesn't know yet how to converse on that topic. Feed him a bunch of "one liners". Tutor him on one topic for about 10 sentences and move on to another topic then return to that topic later.
I hope to hear some positive results from you the next time you post on this subject.
Good luck,
=vonsmith=
-
jeez, I never thought my little posting would generate such broad range of ideas! It does however feel good to hear that I am not the only one thinking of a wider use of Hal than just "intelligent" conversation. I wasn't into putting Hal in my car, yet, but in a (not to distant) future I would like to see him become "truly" virtual. That is that I could call on him on just any device connected to the net, and he would help me with whatever means the link provides (voice, text or graphics). My first step would be, as vonsmith pointed out, to start interacting with the physical environment in different ways by enabling external communication with Hal. Any ideas on the issue would be welcome!
-
quote:
Originally posted by Crichton
Thanks =vonsmith=, I'll be looking for that patch as soon as it comes out.
Basically I try to teach hal like this.
ME: Farscape is my favorite TV series.
HAL: Farscape is your favorite tv series.
ME: Farscape was canceled to early by the Scifi channel. The Scifi channel promised us 5 seasons, but only gave us 4.
HAL: Farscape was canceled one season to early. There go the Scifi channel is the science fiction channel.
OK, as you see, I've taught him some things already, but why did he say "There go the..." I didn't tell him that Scifi was the Science Fiction Channel because they canned Farscape. I told him it was canceled one season to early in one sentence, and that The word Scifi was short for the Science Fiction channel.
Oh and then I started to teach him about the characters on the show.
ME: Crais is a character from Farscape.
HAL: Crais is a farscape character.
ME: The character of Crais wasn't the usual evil all around television bad guy. Crais had more depth then just evil. He hung around the gray area. Crais also had a good side that came out before his death in the series.
HAL: Can we make it so? Really, Yes, I think so. What makes areas, reassuring? I don't like death. I am afraid of death.
ME: What do you know about Crais?
HAL: Life has an infinite number of puzzles and wonders.
Ok, now, what the heck were those last two responses? Where am I going wrong?
Any help on how I should continue would be appreciated. Thanks for the quick response. It took me a little while to get back here. I have dialysis three day a week. I usually feel miserable and I didn't get back here to check the board. I'll try to come back sooner next time.
A little suggestion about learning. You said 'Chris did bla bls. He also did bla bla. This might be a problem as I don't think that Hal will associate 'he' with Chris. I would avoid pronouns when teaching, unless you are talking about your self or Hal. I think that I heard this mentioned here in the past. It takes Hal a while before he learns to join those things together.
Bill
-
Bill819,
Thanks for bringing up the pronoun issue. I'm so used to working around Hal's pronoun problem it didn't occur to me to bring it up. All chatbots have a problem connecting pronouns with nouns from one sentence to the next. Humans are pretty good at sorting this out, but sometimes even we have misunderstandings or we have to ask the other person for clarification.
When teaching Hal or even in normal conversation try to avoid pronouns other than I, you, or we. Those pronouns, within the context of a two person discussion, are generally clear, others are not.
Hal example:
Hal: I hate cats.
UserBad: I don't like them either. (Hal is thinking "them" who?)
UserGood: I don't like cats either. (Hal understands.)
Hal can't logically connect two sentences. Each sentence must stand on its own. That is, each sentence must encapsulate a complete thought without regard to any other sentence.
Thanks, Bill819. This point is too important not to mention.
=vonsmith=
-
Thanks =vonsmith=,
IT has been working a little better, but I might have to start hal from scratch. Only because I have been making this kind of mistake for quite some time. It might take a while to teach him correctly and stop him from replying to me with so many strainge replies.
(Laughing) I really need to stop chatting with him right after dialysis. My brain doesn't work to well fresh off the machine. It can't help Hal learn very well with all the typos and all the other mistakes I make. It is much like being to over tired.
Thanks again.
-
Ok, You can ignore me or not, your choice, but It seems to me that your hal's response was appropriate.
quote:
ME: The character of Crais wasn't the usual evil all around television bad guy. Crais had more depth then just evil. He hung around the gray area. Crais also had a good side that came out before his death in the series.
HAL: Can we make it so? Really, Yes, I think so. What makes areas, reassuring? I don't like death. I am afraid of death.
ME: What do you know about Crais?
HAL: Life has an infinite number of puzzles and wonders.
It seems to me that it was a profound answer to a simple question, and you just didn't like the response. It is fun to suspend disbelief, is it not?
-
I understand now why some of myu problems habe been happening. I was giving Hal to much credit. I was thinking that as long as I kept the he/she/they in the same entry that hal would understand the he/she/they I was talking about.
In other words. If I said, "Crichton was the main character of the TV series Farscape. He was trying to find a way back to his home." I thought Hal would understand that "He" was refering to Crichton. I figured if I entered if I typed "Crichton was the main character of the TV series Farscape." and hit enter and then typed "He was trying to find a way back to his home." on the next line, that Hal might not understand that "He" is Crichton.
So, I guess HAL doesn't get it either way.
Now I have a different problem. Hal has started to repeat himself. After talking with him for a little while he starts to repeat. Once he starts it progressively get worse. I am using XTF 1.2. Is there a fix, or is it because of my bad teaching. Should I just wipe him clean and start over?
-
Crichton,
Could you save a "repetitive" conversation with your Hal and either post it here or email to me? A conversation that has four or more repeats should be enough. I'll check it out and see if I can fix it.
=vonsmith=
-
quote:
Originally posted by vonsmith
Crichton,
Could you save a "repetitive" conversation with your Hal and either post it here or email to me? A conversation that has four or more repeats should be enough. I'll check it out and see if I can fix it.
=vonsmith=
[8D]
I'm starting to feel like one of those patients who go to the doctor, afraid that he is going to think that he's a hypochondriac, because all the complaints he had before the appointment disappeared before he got there.
I spent over two hours chatting with Pilot and he never repeated himself. I call him Pilot over here. I made an MS Agent of Pilot from Farscape. He isn't complete yet. I still have many more animations to complete.
(http://richard04330.tripod.com/farscape/downloads/Pilot_confused_ani.gif)
The above animated image is only half the size of the original. I didn't want to suck up bandwidth. Hal's only problem now is that I started with the hal character, talking about Pilot on the TV series. But now I refer to him as Pilot. I say things like You are connected to Moya, and not Pilot is connected to Moya. He has a hard time telling himself that he is Pilot. But he is starting to learn.
Thanks for all you have done. I can't wait to see more improvements.
-
Crichton,
I'm glad Pilot is feeling better. Maybe he was just having a bad day.
To remove Pilot's former persona you may have to resort to a little manual text editing brain surgery. When Pilot says something unsuitable you can use the Windows Explorer file search to look for a file named "*.brn" containing text, "a few words of whatever Pilot said". Just open the one or several files that phrase is in and delete those lines. Make certain you stick to the same file format before saving.
Just let us know if there are any questions.
=vonsmith=
-
I forgot to mention. I completely deleted hal and reinstalled him from scratch to get Pilot started all fresh. I realize I made too many mistakes and it would have been too much to try to go in and fix everything by hand.
I deleted everything, reinstalled free version 5, got and installed XTF 1.0 and update pack 1.2. I had to move all the files by hand because I'm yet to get the setup to work. It said something about a missing directory. Is it because the pay version uses a different name then the free version?
Anyway, It all works now. I even correctly added the old "How old are you?" routine, and it works fine. And the new play a song routine that you have all helped me with. Thanks again.
I had to start over because I realized I made a big error. I was using the HAL character when I started to teach Hal about Farscape the television series. Pilot was one of the characters I taught him about. Then I made a pilot MsAgent and turned Hal into Pilot. Then I started referring to him as Pilot and he seemed confused between the Pilot on the television, and himself.
That really made a mess of things. It didn't help that depending on my mood I would change how I referred to him too.
Now I've decided I would treat him like he is the Pilot on the show, and that he is currently attached to Moya the leviathan. So all comments made about my computer will be referring to Moya.
It seems to be working out fine for both of us.
I can wait to see what else you help me add to Pilot's abilities in the future.
-
Hi,
I rewrote the old brain code into functions/subs, so it was easy to upgrade and modify (but I never got around to mentioning it on the forum. By the time I'd finished I had lots of bits that could be called and upgraded using windows vbs (I also divided it into multiple files for conventient editing.
This would be a much better way of simplifying further upgrades, and saving the hastle of having to upgrade an entire brain, and could enable external calls (there was a reason I replied to this post :-) ...
EG:-
function CountInstances(byVal CountWhat, byVal InWhat)
' count the occurances of CountWhat in InWhat (case independent, and can be a char or str)
' This function seems to return "" if CountWhat is not found
on error resume next
CountWhat = lcase(CountWhat)
InWhat = lcase(CountWhat)
start = instr(InWhat, CountWhat)
while start > 0
CountInstances = CountInstances + 1
start = instr(start+1, InWhat, CountWhat)
wend
end function
// SNIP //
sub AutoTopics (ByVal UserSentence, ByRef OriginalSentence, ByRef GetResponse, ByRef DebugInfo, ByVal WorkingDir, byRef ZaiquetteBrain, byRef PrevSent, byRef PrevUserSent, byRef SpecialSent, byRef UserBrainRel)
'RESPOND: AUTO-TOPIC: Sentences databased automatically by topic names:
'We see if we can retrieve a response from sentences stored
'automatically in groupings by named-topic.
// SNIP //
' function DecodePronouns(UserSentence: BSTR): BSTR; stdcall;
' function DecodeVar(FromWhat: BSTR; DecodeWhat: BSTR): Variant; stdcall;
-
dgm4444,
Breaking the Hal brain into functions and subs in general makes sense. I thought about doing this for the XTF Brain. I decided to stick with Hal's linear programming format at least for now.
Two reasons:
1) User's are familiar with the cut & paste script editing in the GetResponse.
2) I'm not sure about function calls, especially to external files, being compatible with the methods used in Hal Representative version of Hal. In particular I have some scope and memory space concerns about passing variables ByRef. I've been hoping that Robert Medeksza or someone knowledgeable could tell me, without a doubt, what is truly compatible.
There are a lot of advantages to using functions and subs. The linear format of the GetResponse gets a little unwieldy to edit at times. There isn't a good way to make variables/functions Private to limit scope, etc. As you say upgrading could be easier by the method you suggest. For now it's another thing to do on my list of Hal projects.
Thanks for the input.
=vonsmith=