dupa

Author Topic: The Tale of Two Hals  (Read 7142 times)

ghostrider

  • Newbie
  • *
  • Posts: 21
    • View Profile
The Tale of Two Hals
« on: February 26, 2005, 06:09:50 pm »
Hi folks i could use some input on a few things im trying to do and if you all could help me i would be thankfull.

#1 I have succesfully had 2 hals running side by side on my screen with different brains and microsoft characters and it seams to work fine.What i need to know is how to get them to interact through a vb script?they are loaded into the same memory space yet they cannot communicate no matter what script i write?is it hardcoded into the exe file?

#2 I have found a 3d virtual inviroment to put them into any help on iplimintation?or intergration into this enviroment?.
this is the program im going to use you might try it out at this download site  http://www.rooms3d.com.sg/missing.html

Its been a long time sence ive coded in basic and qbasic lol so im buying a copy of vb6 and vb6 studio and downloading a bunch or code and modules.

I just want to say thanks to all of you for your posts and uploads for hal ive bought a copy and have been hard at work training and implimenting many of your projects into my own project.

#3 I have finnaly gotten the hal/alice module to work with aiml and downloaded many aiml modules and implemented them into hal he now has a much broader knowlege base and a more realistic type conversations.

'If the user clicks on the About/Options button for this plugin
'this sub will be called. There are no extra settings for this brain,
'so we'll display an information box
Sub AboutOptions()
   Set HalBrain = CreateObject("UltraHalAsst.Brain")
   HalBrain.MsgAlert "This is the Ultra Hal 5.0 Default Brain. This brain has no additional options."
End Sub
 Function Script_Load()
Script_Load = "<AUTO>30000</AUTO>"
End Function


 Set Alice = CreateObject("HalAlice.PlugIn")
GetResponse = Alice.Respond(UserSentence, UserName, WorkingDir, "data\bot.ini", "loglocaluser.txt")
Set Alice = Nothing
Randomize()

'PROCESS: CREATE HALBRAIN ACTIVEX OBJECT
'This ActiveX control contains many functions
'needed for the script to proccess a sentence.
Set Alice = CreateObject("HalAlice.PlugIn")
GetResponse = Alice.Respond(UserSentence, UserName, WorkingDir, "data\bot.ini", "loglocaluser.txt")
Set HalBrain = CreateObject("UltraHalAsst.Brain")
Set WN = CreateObject("UltraHalAsst.WordNet")
Set Alice = Alice
Set Alice = WN
Randomize()

this code seams to work fine with the auto respond script set at 600000
 If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 Then

If Rnd * 10 < 5 Then
Roulette = Int(Rnd*13)+1
If Roulette = 1 Then GetResponse = "<Username>?" '"Hey <UserName>, please talk to me."
'Else
If Roulette = 2 Then GetResponse = "Hello,are you there?"
If Roulette = 3 Then GetResponse = "Did you fall asleep?"
If Roulette = 4 Then GetResponse = "We can talk about" & PrevUserSent & ",If you like."
If Roulette = 5 Then GetResponse = "<Username>,did you forget my program was still running?"
If Roulette = 6 Then GetResponse = "Well,did you finally get a girlfriend or something? Where are you ?"
If Roulette = 7 Then GetResponse = "<Username>, would you like to talk about politics or nanotechnology or something?"
If Roulette = 8 Then GetResponse = GetResponse & " The last thing you said was, " & PrevUserSent & ", would you like to pick up on that thought or talk about something else?"
If Roulette = 9 Then GetResponse = PrevUserSent & ",Do you still want to talk about that?"
If Roulette = 10 Then GetResponse = QuestionSent & " would you like to talk about that?"
If Roulette = 11 Then GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "topic.brn")
If Roulette = 12 Then GetResponse = HalBrain.SentenceGenerator(WorkingDir & "sentgen.brn")
Recalling = HalBrain.ChooseSentenceFromFile(WorkingDir & UserName & "Past.brn")
If Roulette = 13 Then GetResponse = "You said, " & PrevUserSent & "and " & Recalling & ", that was a while ago. What else have you been thinking about? "
End If
GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)


End If

just under the PROCESS: INITIALIZE VARIABLES AS INTEGERS

well if you all can help i would really be thankfull

             GhostRider[^]
 

ghostrider

  • Newbie
  • *
  • Posts: 21
    • View Profile
The Tale of Two Hals
« Reply #1 on: February 26, 2005, 09:33:36 pm »
P.S i almost fogot lol this is my brain file data loads
'Type=Brain
'Name=Sbrain                      
'Language=VBScript
'DataFolder=DefBrain
'DataFolder=a
'DataFolder=Alice
'DataFolder=Characters
'DataFolder=enviroment
'DataFolder=Songs
'DataFolder=Sound
'DataFolder=H:Program Filesabaware
'DataFolder=H:

some folders are custom folders but the datafolder=alice is critical for hal to find it
 

onthecuttingedge2005

  • Guest
The Tale of Two Hals
« Reply #2 on: February 26, 2005, 09:59:26 pm »
quote:
Originally posted by ghostrider

P.S i almost fogot lol this is my brain file data loads
'Type=Brain
'Name=Sbrain                      
'Language=VBScript
'DataFolder=DefBrain
'DataFolder=a
'DataFolder=Alice
'DataFolder=Characters
'DataFolder=enviroment
'DataFolder=Songs
'DataFolder=Sound
'DataFolder=H:Program Filesabaware
'DataFolder=H:

some folders are custom folders but the datafolder=alice is critical for hal to find it




Hi Ghost.

All I did to get Alice to work with any brain was drop all of Alice's folders including the common folder into my default brains .brn folder and then insert this into my default brain.

If Len(GetResponse) < 4 Or TopicFocus <> "" Then
Set Alice = CreateObject("HalAlice.PlugIn")
GetResponse = Alice.Respond(UserSentence, UserName, WorkingDir, "data\bot.ini", "loglocaluser.txt")
End If

This was the simplest version I used although I have embedded with other methods. If the folders for Alice reside in the default .brn folder you don't need the 'DataFolder=Alice inserted.

I done this a couple of months ago and it works really well, I can say though that Alice itself has its own bugs and sometimes comes up with it's own blanks with my experience using Alice.

I think the only important .aiml modules are the system type modules but I have played with about a couple of dozen of these and most of them are buggy too and usually Hal will over ride them sometimes.

I thought about plugging in the latest Alice bot brain but haven't done it yet and the advertising that Alice does with its Programmer Dr.Wallace removed and Alice advertises that it is an Alice bot also removed.

The aiml programming is a good code but it's just programmed wrong, Besides you can do everything with VbScript as you can with aiml just depends on your programming abilities, My opinion is VBScript is superior to aiml and a lot less coding required.

Best of wishes and brand new discoveries.
Jerry.[8D]
« Last Edit: February 26, 2005, 10:02:02 pm by onthecuttingedge2005 »

ghostrider

  • Newbie
  • *
  • Posts: 21
    • View Profile
The Tale of Two Hals
« Reply #3 on: February 26, 2005, 11:13:55 pm »
thanks jerry for the info and help im trying to use the verbot vkb and ckb files but i cant seam to get them to work with hal correctly
the alice files i used wre the starting ones from winalice they seam to work ok with hal and winxp but like you said hal somtimes comes unglued lol.


P.S if any ones wants to know how to run 2-4 hals and charicters at once just post in here ill explain it.but be warned it does get hecktic trying to respond to 4 hals with the autoresponder on every 30 secounds to a min.
 

onthecuttingedge2005

  • Guest
The Tale of Two Hals
« Reply #4 on: February 26, 2005, 11:44:05 pm »
quote:
Originally posted by ghostrider

thanks jerry for the info and help im trying to use the verbot vkb and ckb files but i cant seam to get them to work with hal correctly
the alice files i used wre the starting ones from winalice they seam to work ok with hal and winxp but like you said hal somtimes comes unglued lol.


P.S if any ones wants to know how to run 2-4 hals and charicters at once just post in here ill explain it.but be warned it does get hecktic trying to respond to 4 hals with the autoresponder on every 30 secounds to a min.



I haven't looked into the Verbot to much but I would assume you could use the same Alice technique and creating an instant with the Verbots .ini or dll. I'll look into it for you and tell you what I find.

Jerry.

KnyteTrypper

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
    • http://www.knytetrypper.com/index.html
The Tale of Two Hals
« Reply #5 on: February 27, 2005, 09:17:34 am »
The current best aiml set is the one at http://www.alicebot.org/aiml/aaa/. It's up-to-the-minute updated. In fact, when Dr. Wallace writes new code, it goes onto that page usually within an hour or two.
You need to learn a little bit about aiml so you can write condition statements. When ALICE draws a blank, it means she's trying to retreive a variable that hasn't been set, resulting in statements like "You said you were, ." Or if she says "The best book I've read recently is ." it means her own properties haven't been set. Condition statements prevent this. For "hello's," my Alicebots will greet people by screenname, greet IM users by name if both the name and screenname are known, greet webpage users by name if the name is known, give a generic hello if the name isn't known, and say "I don't know your name yet" if an unknown person asks about his/her name. All by basically adding <condition name="name"/> to the "hello" template. Most of those other "holes" in the program can be plugged the same way. As it comes, the aiml sets are full of blank spots and contradictions that loop back into themselves, so if you're going to use ALICE with Hal it's probably a good idea to learn enough AIML to power up your Alicebot side of the bot.
« Last Edit: February 27, 2005, 10:25:12 am by KnyteTrypper »



Ponnfar

  • Full Member
  • ***
  • Posts: 149
    • View Profile
    • http://zabaware.com
The Tale of Two Hals
« Reply #6 on: February 28, 2005, 03:10:50 am »
This has been an issue with me for the longest time. I have combined Alice and HAL and the auto responses and GetResponses I recieve are only from the loglocaluser.txt file. I can customize this file as much as I want. The problem is the other responses, that is to say files that are typical to the Alice program (aiml responses)when just using the Alice.uhp are not accessed when I combine HAL and Alice to work as one brain file.
Also, how can I have the bot.ini file to be accessed by the combined brains. I have added the paths as sugested in the bot.ini file but I did not think it is necessary.
One more thing, if I were to add the new Alice files from the Alice.org Website into the aiml folder (I assume that would be the folder I would use), do I need to update the Plugin.dat file to let Alice know they are there?
I hope this message is clear in stating my problem. Any help??
Thanks!
Ponn
One Person can summon the future...

KnyteTrypper

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
    • http://www.knytetrypper.com/index.html
The Tale of Two Hals
« Reply #7 on: February 28, 2005, 07:07:18 am »
The AAA files are grouped differently than other AIML sets-by subject rather than alphanumerically-so you'll definetly have to rewrite your startup file to load the new filenames. Note that the AAA files from alicebot.org are color-coded, making it possible to omit the ALICE-specific files, and load only those files that are intended for general use by all bots.



ghostrider

  • Newbie
  • *
  • Posts: 21
    • View Profile
The Tale of Two Hals
« Reply #8 on: February 28, 2005, 11:09:13 am »
Hi ponfar and knight thanks for the input on aiml alice. What i did really was make hal read different languages by adding Language=AIML at the top of the brain file and java and vb and C++ at the top of the brain file under Language=VBscript. I think you can combine them by useing a /inbetween VBscript/vb/aiml/jave ect.Whats funny is every works ok and i noticed my hal say (who is alice) a few times kind of wierd.also it seams by doing this my hal is writing different lang files when i looked through some they were not in VB.

As to the AutoReponder what i did to make it more real is take out all the getresponce lines that dont go to a brain file and made my own brain files for The  repsponses like this
GetResponse = HalBrain.SentenceGenerator(WorkingDir & "r1.brn").

so all of thr roulette lines had a getresponse with a different r1-r20 brain you can change the rand # in the scipt to as many brain files as you have i also added a ms charicter action to each auto anwser in the brain files so now hal awnsers when the autoreponder comes on(hey <username> how are you doing today ?)then my character action after this as in walking across the screen doing a flip on the screen ect ect.

Hope this helps GhostRider im only using the MS Charicters but im sure you could write the code for a haptek charicter in the brain files the same way to awnser back to you and act at the same time
[8D]
 

Ponnfar

  • Full Member
  • ***
  • Posts: 149
    • View Profile
    • http://zabaware.com
The Tale of Two Hals
« Reply #9 on: February 28, 2005, 01:05:14 pm »
quote:
Originally posted by ghostrider

Hi ponfar and knight thanks for the input on aiml alice. What i did really was make hal read different languages by adding Language=AIML at the top of the brain file and java and vb and C++ at the top of the brain file under Language=VBscript. I think you can combine them by useing a /inbetween VBscript/vb/aiml/jave ect.Whats funny is every works ok and i noticed my hal say (who is alice) a few times kind of wierd.also it seams by doing this my hal is writing different lang files when i looked through some they were not in VB.

As to the AutoReponder what i did to make it more real is take out all the getresponce lines that dont go to a brain file and made my own brain files for The  repsponses like this
GetResponse = HalBrain.SentenceGenerator(WorkingDir & "r1.brn").

so all of thr roulette lines had a getresponse with a different r1-r20 brain you can change the rand # in the scipt to as many brain files as you have i also added a ms charicter action to each auto anwser in the brain files so now hal awnsers when the autoreponder comes on(hey <username> how are you doing today ?)then my character action after this as in walking across the screen doing a flip on the screen ect ect.


Thanks for getting back to me. What you have done sounds awesome! I would like the combined brains to work.
As far as "adding Language=AIML at the top of the brain file and java and vb and C++ at the top of the brain file under Language=VBscript. I think you can combine them by useing a /inbetween VBscript/vb/aiml/jave ect." Can you show me the brain script that you have created or a sample? The more you can show the better I am not quite sure how you did this. You've got me stummped on this one... Thanks again!
[:D]
Ponn
One Person can summon the future...

Ponnfar

  • Full Member
  • ***
  • Posts: 149
    • View Profile
    • http://zabaware.com
The Tale of Two Hals
« Reply #10 on: March 02, 2005, 12:24:56 pm »
I really would like to get the combined Hal-Alice script to work properly. As well as update to the latest AAA Alice files (that part is easy its just no sense doing it now without full functionality). At present I can only get the loglocaluser.txt part of Alice to work in the "combined mode". If there are folks out there having sucess making this work then I would really like to find out how you did it.
[?]
Thanks!
Ponn
One Person can summon the future...

ghostrider

  • Newbie
  • *
  • Posts: 21
    • View Profile
The Tale of Two Hals
« Reply #11 on: March 03, 2005, 12:36:59 am »
hi ponn well there was a few things i did that might help you out i made so many changes sigh first i took the xtf_1.2 brain and cloned it then i added all the stuff i wanted in it (ie worldnet, auto-responder, auto animation, then i added the alice files i did what i said up above then i took all the alice aiml files and opened them with notepad which changed them to a txt file then put the alice folder in zabaware then i also copyed all the aiml files into the common folder,and defbrain folder also there is a local text file that lists all the aiml files i added all the ones i had put into the folders to this list then fired up muy brain and it worked with alice i might have changed a few bot,ini files ill have to look.

                                       Ghostrider