Author Topic: Evolution scripts.  (Read 3526 times)

onthecuttingedge2005

  • Guest
Evolution scripts.
« on: October 21, 2003, 02:55:29 am »
If we want to build an A.I. system that evolves then here are some steps.

1.Every "single" word in a conversation must have its own detection
file and not shared with any other word. but this would become rather
time consuming writing an isolated script for every single word itself so we would have to develope a script that would extract every
important word from a user's sentence and write a .brn file automatically for each word in two forms, one would be a detect file and the second would be a topic file, Hal would see the users sentence like this.

User: do you think dinosaurs will ever be brought back like T-rex?

this is what Hal would see: dinosaurs brought back T-rex?
Hal would then turn these topic words into detection files
like this:
TEACH_dinosaurs.brn / TEACH_brought.brn / TEACH_back.brn / TEACH_T-rex.brn

inside TEACH_dinosaurs.brn would be: "DINOSAURS","TRUE"
inside TEACH_brought.brn would be: "BROUGHT","TRUE"
inside TEACH_back.brn would be: "BACK","TRUE"
inside TEACH_T-rex.brn would be: "T REX","TRUE"

then Hal will append the original User statement
to additional self created files like this:
dinosaurs.brn : do you think dinosaurs will ever be brought back like T-rex
brought.brn :do you think dinosaurs will ever be brought back like T-rex
back.brn : do you think dinosaurs will ever be brought back like T-rex
t rex.brn : do you think dinosaurs will ever be brought back like T-rex

If Hal has detected that he has already made a detection file then he will skip making a new one of the same word so duplicates are not made accidently.

this is what Hal will do once he has done all this, he will search the user sentence for ( two ) of the important detected words and then
look for a string that has those two matching words found, when he has found the matching sentence he will choose that sentence for the GetResponse to the user instead of a random statement within the same file.

I really like Hal, he's growing up, But Hal needs to get rid of those
(random) responses period. Hal needs to be able to pick at least two
important words from the user and get a direct response to stay on topic.

there would also have to be a filter script that wouldn't let hal
write a detection file for words that are unimportant like.
If
Then
The
To
Too
Yes
No
so hal doesn't think these are actual topic words.
Well I think I covered my thoughts for tonight.
If anyone would know a way to get hal to do this lets do it.
Jerry.







« Last Edit: October 21, 2003, 03:01:17 am by onthecuttingedge2005 »

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
Evolution scripts.
« Reply #1 on: October 21, 2003, 09:37:26 am »
The new WordNet functions in Hal 5.0 can be used to locate the first noun in a sentence which very often is the subject of the sentence (take a look at Hal 5.0's current Hypernym/Meronym routine). You could then use a single Q&A brain that lists the word as a question. You can have multiple entries of the same word and Hal would choose randomly between them.
Robert Medeksza

bobrush

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://webmasterschoice.com
Evolution scripts.
« Reply #2 on: October 22, 2003, 04:56:16 pm »
Do you have a list of additions like this that you have invented?

Ponnfar

  • Full Member
  • ***
  • Posts: 149
    • View Profile
    • http://zabaware.com
Evolution scripts.
« Reply #3 on: October 22, 2003, 06:57:48 pm »
This sounds like another great idea. I have to at this point ask your help however. It appears that you have excelled at being able to be imaginative with HAL. However, Robert has not made it easy for the programming neophite, those just geting started to make use of end user innovations like yours. I am sure he meant no harm and as his business grows and others interest in HAL increases, (and it will...I want in on the Zabaware IPO!) maybe he will get the hint. Rob is still cool.  
You are light years ahead of most HAL users. So maybe for my benefit at least you could take a couple of steps back.  I have downloaded many of your new brain scripts ".brn"s I hope I go that right, medical, music, politics,etc. Your science package even has a word document that comes with it and I have no idea how to make use of that. Do I cut and paste that into the vbs script-file of the defalut brain? If so, where generally is the best place, the beginning, the end? Not risking curruption of the 4.5 default brain I have created a test brain to run the new downloded ".brn"s.
Finally, I suspect it is mearly an explantion of what I am about to download but when a "script"  is included in the posted message and there is an attachment as well, is that script meant to be added to the brain's vbs script by a cut and paste to my test brain vbs script using the brain editor (again if so, where) and then the attachment simply copied to the appropiate brain directory? Futher, after simply copying the "*.brn" to the new brain's diectory and initiating a conversation with HAL, the verbage you have created in the "scripts" never shows up. I think you got the point here, I hope so anyway...HELP!!! [:)]
Well, if you take the time to answer all this you can bet it will be much appreciated and I look forward to enjoying HAL half as much as you do!! With your help and folks like you I am sure I will, real quick!
Thanks
P
« Last Edit: October 22, 2003, 07:06:43 pm by Ponnfar »
One Person can summon the future...

onthecuttingedge2005

  • Guest
Evolution scripts.
« Reply #4 on: October 22, 2003, 10:10:44 pm »
Hi Ponnfar.

I usually put my scripts after the below script in all default brains.

'RESPOND: HAL NOTICES HE IS REPEATING HIMSELF
   'Hal may make a comment or alter his remark
   'if he detects himself being repetitious.
   If HalBrain.CheckRepetition(GetResponse, PrevSent) = True Then
      RepeatResponse = HalBrain.ChooseSentenceFromFile(WorkingDir & "halrepeat.brn")
      GetResponse = Replace(RepeatResponse, "<response>", GetResponse, 1, -1, vbTextCompare)
      DebugInfo = DebugInfo & "Hal has noticed he is repeating himself and has made a comment about it: " & GetResponse & vbCrLf
   End If

( I will paste all my script below the above hal response script )
search for the above script and paste from there down careful not to
interfere with any other script, I always make an area like this to paste in.

'########### MY SCRIPTS GO INSIDE THESE POUND SIGNS. ########
'PLACE SCRIPT INSIDE THIS AREA.
'######### END OF MY SCRIPT AREA. ###########################

notice the apostrophe before the pound sign, this apostrophe
will make the text on that single line the color green.
the text beginning with the apostrophe will not be functional
and only used in describing the script, however the first four lines
at the top of hals brain file do not alter because those can give you an error if altered the wrong way, but you can change the default name
of the brain but be careful.

Now we place all .brn files that go with the script and download them to the C: programs, zabaware, Ultra Hal Assistant 4, (DefBrain) folder.
Don't forget to peer inside the detection and the teach .brn files for keywords that set Hal into action on a topic.
Hope this helps some.
Best of wishes and grand new discoveries.
Jerry.
« Last Edit: October 22, 2003, 10:13:26 pm by onthecuttingedge2005 »