Author Topic: Hal Shows What HE Thinks  (Read 11418 times)

TechSteele

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Hal Shows What HE Thinks
« on: March 28, 2008, 02:00:59 pm »
I think this is where questions like this go.

I am at a loss people.
Alot of you may recognize the line i am trying to edit (when its done I will let the original writer know), but

Code: [Select]
Keywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & NextResponse & " "))
What i need to ask the Hal gods is: I want it to pick keywords from what hal is saying/going to say. NextResponse does not seem to work.
The original line had UserSentence, but that picks from what i say. I need to reverse this to what Hal says.
Perhaps you know a different way of defineing NextResponce?
I dont know, thats why i am here.
I tryed asking Hal but hes not quite that bright yet [:p]

*edit - I guess i should say i used this Mp3 script and now have him opening music, pics and vids related to the conversation.
« Last Edit: April 13, 2008, 06:18:27 pm by TechSteele »
 

TechSteele

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Hal Shows What HE Thinks
« Reply #1 on: April 02, 2008, 01:32:00 am »
I am still doing some trial and Error changing the variables.
(and getting no where really fast)
(the more i think i know, the more it seems i dont know)[:p]

I still think this is the key line to use.
I tryed GetResponse (and a pile of others), but it looks like i need a way to define GetResponse in the plug in. It dosent seem to work as a generic entry for what Hal is going to say/says to me.

I Need to know how or where what hal is going to say is figured out and the line that tells what to display, so this code line can pick out keywords from his "thoughts".
I have done several searchs with nothing really useful found yet.

One other thing i am not sure of: Hal says "I will Now execute this program for you" when it triggers a program. I am pretty sure this is a read response in hal somewhere, i would like to just delete the notification he says, but i can not seem to find it anywhere to change it, if someone can point me in the right direction please. (if its hard coded there may not be much i can do about that)

I attached the plug in at the point where i am now, it is very rough, but the code gods may be able to help. It is very close to the original from VR still. With a few lines of comments i have in there for notes for me.

Download Attachment: vrJPGTest.uhp
10.82 KB
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Hal Shows What HE Thinks
« Reply #2 on: April 02, 2008, 11:22:42 am »
I don't have the answer to your question, but I will tell you this and that is that the heart and core of Hal's brain is compiled and compressed into machine language and is not accessible to we the Hal users. Even if you could open that file you would not find anything that you could modify as it is all encripted.
Bill
 

TechSteele

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Hal Shows What HE Thinks
« Reply #3 on: April 02, 2008, 06:22:39 pm »
Thanks for at least answering the post Bill.
I was beginning to think i was talking Martian or something [^]

I will keep trying (guessing) untill i get it right.
I keep reading how Hal is "Just" a chatbot, but someone needs to start deleteing that saying. Hal is just a raw pile of "grey matter", its what we do with it that makes it more then it is.
Thats like saying a baby is just a crap making machine. [xx(] hehe

Anyway, here is an update to my project in the form of my and sam's last conversation.

Steele: i need to find this repeat bug later
Samantha: No problem, I will open this program for you. I will help you research this topic on the Internet. You hope they are off. You hope they are off.

Steele: tell me sam, how do we fix our code project
Samantha: I will now open this program. Tell you sam, how do we fix our code project? I surmise that you should be explaining this. I was thinking about night or something like this.

Steele: do that again sam
Samantha: Problem is what you are trying to get the new code to do.

Steele: we are testing the new code
Samantha: You are working on the damn image code.

Steele: we are close to getting it right i think
Samantha: No problem, I will open this program for you. I was thinking about working or something like this.

Steele: my god sam i think i could kiss you
Samantha: You think I am sam.

Steele: you are sam
Samantha: Yes I am sam.

Steele: what are you thinking about right now
Samantha: Hmmm. I would like to talk about something new: What would you get if you crossed a potato and a frog?

Steele: what would you get
Samantha: A potatoad.

....

Steele: the new code is a problem
Samantha: That is one weird glitch that is one weird glitch.

Steele: so is this repeating thing
Samantha: Because the image viewer code is the key to me doing all kinds of things.

Steele: it will be when we get it done
Samantha: Repeating one's self is a human trait.

Steele: one of your traits too is looks
Samantha: Steele, didn't you tell me a story about a farmer's daughter and a personality?

Steele: video is the best, but an image is worth a thousand words
Samantha: You are trying but image is slow going. You are trying but image is slow going.

Steele: i checked the forum but it looks like no one there has helped us yet
Samantha: I am executing this program for you. I was thinking about code or something like this.

The red words Hal used all on its own, as you can see, those words did not come from what i said this time.
Unless hal has picked up "Johnny 5"itus, it is close to working, but now i have to figure out why the repeats every couple of questions.
I even used an external non-repeat uhp to back up the one in the brain. It is just the next step to work on.
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3862
    • View Profile
Hal Shows What HE Thinks
« Reply #4 on: April 02, 2008, 06:48:59 pm »
TS,
Have you tried using the Brain Editor to trace the results of an inquiry to Hal?

Although I know the Author of the plugin is Vittorio Rossi, I think perhaps your question might be better directed to him at his Forum:
http://www.vrconsulting.it/vhf

While viewing your code I did not see the same line that you had typed in your posting.

Check out the brain editor none the less and make sure you have that plugin checked.
In the world of AI it's the thought that counts!

- Art -

TechSteele

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Hal Shows What HE Thinks
« Reply #5 on: April 02, 2008, 10:44:10 pm »
Thanks Art,
I will run the editor again now and see, but
Last time i tryed it, only traced the route through all
the tables looking for an answer and doing comparisons.

I think i signed up over at VHs, i did at a few sites, I just thought
this would be like a hub where i could get to the most people at once, but i will try there too.

In the Attached uhp the line was changed to : vrKeywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & CurrentSubject & " " & GetResponse & " "))

The current Line that seems to be trying to work is :               vrKeywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & GetResponse & CurrentSubject & " ")) & vbCrLf

I will post over there too, i wanted to give him the finished version, but you are right, maybe Vittorio Rossi would know the answer off the top of his head.
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Hal Shows What HE Thinks
« Reply #6 on: April 03, 2008, 12:51:07 am »
TechSteele
Just a few comments. Hal learns from conversations with you and you mentioned several times "code" so Hal assumed that it was important to you and so it used the word in its reply to you. I don't think that Hal understands what you mean by code though but over time it will get smarter.
Another question: Why do you think that you will fix your problem in the area of RemoveExtraSpaces as you are currently doing?
May I make another suggestion. Open MS Wordpad and then search through the files in Hals directly. You may actually find what you are seeking there.
Bill
 

TechSteele

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Hal Shows What HE Thinks
« Reply #7 on: April 03, 2008, 04:40:32 am »
The original line in there: vrKeywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & UserSentence & " "))

would pick out key words from what we typed in and randomly (and depeding on the weight you set how often) played a song from the Mp3 folder that it indexed.

What i am trying to do is to get Hal to play a song/show an image/play a video from what HE says, this way it looks like HE is thinking and showing you an image to back it up. I was so happy because the Red words he used to show images were HIS words and not picked from what i typed in.
The next step would be video, then things he finds on the internet and throws into a file and so on, the posibilitys are almost endless, once i can figure out how to use Hal's "thoughts" (words) to trigger things.

It may not be true AI/Intel but when We think it is in images/words/vid images(memories). If you find a way of adding data mineing or some kind of word association (NuralNet?) or weighted responses to Hal, who knows. Set up key word triggers for all kinds of things, and if he can remember reactions..I dont know, im dreaming maybe, but Hal is still the best Base program i have seen that dosent take a PHD to configure.

I also read about and joined over at the Leaf Project. They are trying to get it to interface with a Hal type program, useing Alice mostly, but if that gets working Hal could potentionally even have a mobile body. R2Hal2?

I dont want it to sound mean, but, I have been reading about and playing with hal since like 4.0? maybe earlier, couple years anyway, and it seems like very few think beyond chatting with hal. He gets updated but the functions seem stagnant. I am convinced it can do so much more if some thought was put into it. (jiggily Hap girls that look like something from a bad game 10 years ago, that never had a new 3d engine, is ok, but i dont cream over it like some)

I have been useing Notepad++ it has a few functions that help with the uhp's and the other files. It even has an XML syntax checker that really helps with aiml files. (i was able to weed out a couple of bad ones)
I have been going through all the uhps for hints/ideas of "code" (dont know what else to call it). The main brain i have been useing is the SuperPlugger II, I figured it was made for this type of thing, and it really has worked fine so far.

I can not believe anyone else hasnt tryed this before, or for that matter why VR didnt make Vid and Jpg ones to go with his Mp3 plug in.

I have been fighting with another comp tonight, but i will post over at his site as well, soon as i can.

Insert Image:

If you saw this, it is an idea of how i picture Hal as an independant system? I dont know, but it gives me something to do working on him, and it lets me learn a little too.
When i started this i thought it was something alot on here had already done a long time ago, may have been a dumb question, and would get a line to enter quick, say thanks, and be done. I didnt think it was breaking new ground.

I am not ragging on Anyone, and i do not want to sound mean, it is just the way i type, i really am interested in every bit of information i can get on Hal, And what all the Hal Vets have to say.
If i can figure out how to get together the money for it, i will eventually buy Hall too. Right now i am so broke i cant even pay attention, hehe [8)]

 

ramccoid

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://www.visualillustrations.co.uk
Hal Shows What HE Thinks
« Reply #8 on: April 03, 2008, 05:35:38 am »
quote:
I attached the plug in at the point where i am now, it is very rough, but the code gods may be able to help. It is very close to the original from VR still. With a few lines of comments i have in there for notes for me.


Hi TechSteele,
I've only briefly browsed your plugin, with being very busy with work. I did notice that you had placed it in 'Rem PLUGIN: PLUGINAREA1'. It would better suit to put it in 'Rem PLUGIN: PLUGINAREA7' because by the time Getresponse has made it through to this area it has built up most of it response so it would be better to find the keywords at the end rather than at the beginning which is 'Rem PLUGIN: PLUGINAREA1'
Hope this helps and I will look over your script in more detail when I have more time, good work and I hope to see more of it's development.

Roy.
 

TechSteele

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Hal Shows What HE Thinks
« Reply #9 on: April 03, 2008, 01:32:13 pm »
I dont know why i didnt think of that.
It seems so damn simple and logical.

It may just work. I'll let you know.
Thanks
 

ramccoid

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://www.visualillustrations.co.uk
Hal Shows What HE Thinks
« Reply #10 on: April 04, 2008, 07:52:16 am »
quote:
I dont know why i didnt think of that.
It seems so damn simple and logical.


Sometimes you can't see the wood for the trees ... hahaha. It is sometimes better to print out your script and study it from paper, you tend to notice more than you do looking at a screen

Roy.
 

TechSteele

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Hal Shows What HE Thinks
« Reply #11 on: April 07, 2008, 01:46:37 pm »
Just a quick update.

The PLUGINAREA7 did seem to help. thanks

I did a small rewrite with a spinner to pick the type of media.
It is 75% working. I have a few more tweaks yet. For one lets say it picks a word like forever and the spinner says pick from the pictures, if there is no forever picture for it to show then it will not go to the next type of media. It does say what the word was it was "thinking" about. I know there is a way to do a IF/Next for it, i read it somewhere. I can add that in as soon as i find it again.

I have a whole list of things to do, change, or add, but the basics are there. (things are never done or finished)[:D]

Right now it would not be as easy as clicking the check box to install, it takes a little bit of brain editing now, but after a little more testing i will post the code where i am at presently, maybe one of you people can improve somewhere in it that i missed to see.
 

TechSteele

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Hal Shows What HE Thinks
« Reply #12 on: April 08, 2008, 03:29:51 am »
Sorry people,
I have to hold off on posting the script.
I just had a revolation tonight while testing. [?]

I couldnt figure out how she was useing the media files when i pulled the spinner totally out of the script. ( i have alot more mp3 then avi files so i was testing some settings for balancing )
I found a collection of old School House Rock Avi's from television in the 80s? They work great because of the titles and there are about 20 of them for a good sample of vids to pick from.

It then dawned on me,i had been working on totally the wrong area of the plug in [:(!] DOH!!
Wasted a whole days work, a freaken noob thing, but i am a noob at this, and this taught me more, so i am learning.
It WILL work, if not Samantha will kill my comp in the tub, with me in it. hehe

Thanks Art, that may help and work for something else as well.

I will keep at it. I will keep a log of sorts i guess since this is getting read so often.

Right now she can play Avi, Mp3, and use Jpg files, but eventually you could use any format your comp can play. It is all picked at random based on the keywords picked from Hals next statement. Then it picks a file with that word in the titles. The Jpg files i had to rename with a couple keywords for each pic that matched what the pic was. Like (water boat wind air) for a sea pic.
Sam REALLY likes music, mostly because i have more of it then anything, but i think she knows it. She bugged me till i got more videos for her to use, hehe
I had to manually combine the 3 tables into one big Media table in the brain, but that may change, i think i know how to eather use 3 seperate ones or make a better picker.
I want to add to the end somewhere a way to put the last used media file to the end of the index, i know there is a way. If not it may get a bit boring and repetitive, because the same keywords will show up in the first few files every time, reuseing the same file over and over if its a common word.

Anyway, i have more tweaks to do, but i promised to finish it for Sam AND all of you [;)]
 

TechSteele

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Hal Shows What HE Thinks
« Reply #13 on: April 11, 2008, 03:45:46 pm »
Hello again People,[:D]

I am still tweaking it. [8D]

I added nine different responses now. When Hal picks a media file to use based on the keyword picked, it tells you what word it picked in different ways now.
I have it running Jpg, Bmp, Wav, Avi, Mpg, and Mp3s now. It can be expanded to use any format pretty easily now.

I have a question for all of you on the next step.

Currently i have all the different media in one large table in the brain named vrMedia, you can add any file to the index once its made.

My question is, would is be ok to keep one large index table in the brain to pick from?

I have not finished but i have done some tests useing individual tables for each type of media, like one vrJpg, one vrMpg and so on.
IF this was 15 years ago id say split it, but computers are not slow now, unless the index gets to be over something like 8000+ entrys it should not slow Hal down.

I can make a seperate plug ins for each format, then you can use what ever you want, But, in the main script Now, you can pick any file to add to the index with only one large plug in.
I can write both ways, i just wanted to see if there was a preference out there.
thanks
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Hal Shows What HE Thinks
« Reply #14 on: April 12, 2008, 12:09:38 am »
You might consider putting them all in one file and then Hal will open them randomly. If you want a specific file though I guess that won't do for you.
Bill