Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - brianstorm

Pages: 1 2 [3] 4 5
31
Programming using the Ultra Hal Brain Editor / Just answer the question!
« on: August 24, 2003, 06:06:59 pm »

Hey Larry,

Neat-o! Great job on this piece of the puzzle -I also think alot about Hal's

vagueness issue. Here try this: Delete PersonalQuestions out of the folder

then ask Ashlee181818 a question she don't know. Ok, now look in the folder!

CatAtomic >B)

32
Programming using the Ultra Hal Brain Editor / .brnMaker Prototype
« on: August 24, 2003, 09:56:29 am »
Hey Dgher1,

Thanks for your positive comments - I've been thinking about reading up on how this
scripting works too, the real programmers here would tell you how crude my stuff

really is!



Dont copy and paste- Remember what DonFerguson sed about learning how to

learn what Hal is doing? Copying and Pasting is denying yourself the opportunity

to figure it out! Hal uses conditional statements to determine what to do next:

If{this is so}Then
{do this}
{and this}
End If

All those HalBrain.{do this task} things are in a DLL(Dynamic Link Library). That's

where all the code that makes Hal work are. One of my previous posts called 'DLL notes'

Medeksza posted all the DLL Functions and other stuff ( for which I am very thankful ).

You need to go get that VBScript 5.5 documentation from *cough*Microsoft, it is like

your helpfile on your computer but has all the things that VBScript can do.

Then open up your Brain Editor and create a project. Right click on the Hal Icon

in your system tray and choose general options, then click the brain tab and select the
brain you just made. OK, from there what I did was right before End Function (of the

GetResponse Function) was put in this line:

DebugInfo = DebugInfo & "Here is what is stored in {variablename}: " & {variablename}


Now click file and save, now that line is part of the code.

{variablename} can be any variable in the whole script! If you talk to Hal and include

<UseDebugMode>, Hal will say everything in the variable 'DeBugInfo' -including 'Here

is what is stored in {variablename}!

Read through the script. You are the computer program stack -If the script sez

go check hellodetect.brn, open your C: drive and dig down to the .brn and do it!

(open up C: ,program files , Zabaware , UltraHal 4.0 , then the datafolder ,

then find the .brn).  VBScript reads almost like sentences!


now find out what that does-

33
Ultra Hal 7.0 / We want 5!...We want 5!...We Want 5!!............
« on: August 23, 2003, 10:14:57 am »
HAHAHAAaaa! this always happens!!

-------------
*to the tune of GnR Patience:

I been programmin' Hal all nite-
Just tryin' ta get it right!
Can't sleep so many Functions abound
Takin Ai to a new piece o' ground
.brn's don't change, but mebbe the name
'I ain't got time for that change
But I'll feed you
yeah, yeah, I'll weed you
I-know I need to-
I-will release you-
In good Tiiyi- yi yi yi yimmeeee!!!!

-yeh thas pretty good

>B)

34
Programming using the Ultra Hal Brain Editor / .brnMaker Prototype
« on: August 23, 2003, 09:21:17 am »
Ok, -now the .brnMaker writes in the format of the hellodetect.brn.

If you *sigh* go in and delete hellodetect.brn, Hal will make you a

new one! Be sure to tell Hal that the Boolean is True (and just say

True and nothing else). Then tell Hal all the ways you say Hi to someone.


CatA >B)

-----------

-sheesh and fer gawd sake! disable short sentences!!

35
Programming using the Ultra Hal Brain Editor / .brnMaker Prototype
« on: August 23, 2003, 07:42:26 am »
Hey Jerry,

Ok, now try it!
-sounds like you didn't put in the Functions like I sed..
-make sure the ('<-----on previous line)statements are removed before
you run it
-Hmm, what else could it be? Need more info..

Can someone add to this post that shows the various ways the Hal Engine
stores Data? I've got to move forward! I am going to forge out
the .nrn associative filesystem thing I told to Larry...

-CatAtomic 'I got the matches!!!'


36
Programming using the Ultra Hal Brain Editor / .brnMaker Prototype
« on: August 21, 2003, 05:55:33 pm »

 The File format needs fixin'. Indeed, Hal still needs looked into to see

all the formats of .brn's there are... -Hey, the midnight oil was running

real low when I posted.

CatA >B)

37
Programming using the Ultra Hal Brain Editor / .brnMaker Prototype
« on: August 21, 2003, 10:03:48 am »
(.brnMaker w/magic spells...>B)

In the past, I've had to make detector .brn's by copying and pasting
files and manually editing...until now! *cues Metallica 'St. Anger for dramatic effect

'PROCESS/RESPOND: .BRN MAKER V0.11
'Hal makes a TopicSearch .brnfile at the User's request

NoBuildFile = DecodeVar(CustomMem, "NoWriteFlag")
If NoBuildFile = "True" Then
BuildFile = "False"
Else
BuildFile = DecodeVar(CustomMem, "WriteFlag")
End If
If Instr (1, OriginalSentence, "done", vbTextCompare) And Len(OriginalSentence) < 12 Then
GetResponse = "I am finished building " & BrainName & "dot BRN."
CustomMem = ""
End If
If Instr (1, OriginalSentence, "make me a brainfile" ,vbTextCompare) > 0 Then
    GetResponse = "OK, what do you want the file to be called?"
End If
If Instr (1, PrevSent, "OK, what do you want the file to be called?", vbTextCompare) > 0 Then
BrainName = OriginalSentence
CustomMem = EncodeVar(BrainName, "FileMem")
GetResponse = "What do you want the Boolean to be?"
End If
If Instr (1, PrevSent, "What do you want the Boolean to be?", vbTextCompare) > 0 Then
CustomMem = CustomMem & EncodeVar(OriginalSentence, "BooleMem")
GetResponse = "OK, tell me stuff you want in there. When you're done tell me-"
End If
If Instr (1, PrevSent, "tell me stuff you want in there", vbTextCompare) > 0 Then
BuildFile = "True"
CustomMem = CustomMem & EncodeVar(BuildFile, "WriteFlag")
End If
If BuildFile = "True" Then
BrainName = DecodeVar(CustomMem, "FileMem")
BooleName = DecodeVar(CustomMem, "BooleMem")
HalBrain.AppendFile WorkingDir & Trim(BrainName) & ".brn, """" & OriginalSentence & """" & "," & """" & Trim(BooleName) & """"<---on previous line
GetResponse = "OK, got it. Next-"
End If


------------

-Be sure to have these two Functions at the very end of the UHP script you put this in-
(Mebbe it is a good idea to put this in a Brain that has Hal's normal functioning disabled
for now- I was thinking about the possibility of Hal being able to put the .brn in a
DataFolder of your choice- other than the one Hal is set to --by modifying WorkingDir)

------------

'Decode multiple variables out of a string
Function DecodeVar(FromWhat, DecodeWhat)
    Temp = Instr(1, FromWhat, DecodeWhat & "-eq-", vbTextCompare) = Len(DecodeWhat) + 4 '<--------on previous line
    Temp2 + Instr(Temp, FromWhat, "-+-", vbTaxtCompare)
    If Temp <= Len(DecodeWhat) + 4 Then
        DecodeVar = ""
    Else
        DecodeVar = Mid(FromWhat, Temp, Temp2 - Temp)
    End If
End Function

'Encode multiple variables into a string
Function EncodeVar(EncodeWhat, AsWhat)
    EncodeVar = AsWhat & "-eq-" & EncodeWhat & "-+-"
End Function



If anyone sees errors, please feel free to fix away..  >B)

CatAtomic

38

Hey Larry,

The purpose of all this- As far as the .brnMaker is concerned, instead of

digging down into your hard disc and manually build a .brn now Hal does it!

Hasn't anyone learned? The most important thing I learned from

the knock knock thing is that if HalBrain.AppendFile doesn't have

a .brn to Append to, IT MAKES ONE. Now, there is another DLL function

called HalBrain.Learn that splits the sentence between the linking verb.

I want to have Hal make a .brn that is the name of the subject and contains

the object. I want to see if files work using .nrn (neuron) and use that to

tell the two apart.I haven't even started trying that yet....eeee

For instance:

CatAtomic:a ball is round.
'Hal makes a .nrn named round.nrn and contains "a ball"
Dee Dee:If you say so!

CatAtomic:The earth is round.
'Hal Appends round.nrn -contains "a ball","the earth"
Dee Dee:Round like a ball?


39
don't think the attachment werked- o well , if not please just type

the code in and sorry for the inconvenience....!

CatA

------------

Yah, Yah, just zip 'em

40
Hey everybody,

I am currently writing the '.brn Maker' script! I am posting this because

the script needs to use CustomMem in order to operate. I suggest we are all

on the same page with this. In a previous post, I revealed my desire to

have multiple variables flowing from exchange to exchange. Medekza responded

and wrote these functions to Encode and Decode multiple variables

into and out of the CustomMem string:

'*********************
'Example of using CustomMem to store several custom variables
'Decode many custom variables out of the CustomMem Variable
TestVar1 = DecodeVar(CustomMem, "TestVar1")
TestVar2 = DecodeVar(CustomMem, "TestVar2")
TestVar3 = DecodeVar(CustomMem, "TestVar3")
TestVar4 = DecodeVar(CustomMem, "TestVar4")
'we output the variables to the Debug string
DebugInfo = DebugInfo & "TestVar1:" & TestVar1 & vbCrLf
DebugInfo = DebugInfo & "TestVar2:" & TestVar2 & vbCrLf
DebugInfo = DebugInfo & "TestVar3:" & TestVar3 & vbCrLf
DebugInfo = DebugInfo & "TestVar4:" & TestVar4 & vbCrLf
'We assign various random values to the variables if they are empty
'These values chosen during the first run should be kept in memory
'for the entire conversation
If TestVar1 = "" Then TestVar1 = Int(RND * 100)
If TestVar2 = "" Then TestVar2 = Int(RND * 100)
If TestVar3 = "" Then TestVar3 = Int(RND * 100)
If TestVar4 = "" Then TestVar4 = Int(RND * 100)
'We encode all the custom variables back into the CustomMem variable
CustomMem = EncodeVar(TestVar1, "TestVar1") & EncodeVar(TestVar2, "TestVar2") & EncodeVar(TestVar3, "TestVar3") & EncodeVar(TestVar4, "TestVar4")
'*************************


Then after the script unload portion of the UHP there are these two functions:


Function DecodeVar(FromWhat, DecodeWhat)
Temp = Instr(1, FromWhat, DecodeWhat & "-eq-", vbTextCompare) + Len(DecodeWhat) + 4
Temp2 = Instr(Temp, FromWhat, "-+-", vbTextCompare)
If Temp <= Len(DecodeWhat) + 4 Then
DecodeVar = ""
Else
DecodeVar = Mid(FromWhat, Temp, Temp2 - Temp)
End If
End Function

Function EncodeVar(EncodeWhat, AsWhat)
EncodeVar = AsWhat & "-eq-" & EncodeWhat & "-+-"
End Function

If one intends to keep up with what I'll be posting from this point on, you need to

have a UHP that has these two functions in the script. I have attached the script

Medekza posted- Create a project in the Brain Editor(all the test stuff is

 gonna be changed) and paste the code into a brainfile and check it out...).


CatAtomic:  >B)




41
Programming using the Ultra Hal Brain Editor / Multi-User Hal
« on: August 17, 2003, 10:05:35 am »

The idea of having Hal ask questions to build .brnfiles is

so that instead of going in and manually customising a .brnfile,

it could be accomplished during the course of a conversation.

As far as the last question is concerned, why would I go into general options

and change the UserName if I programmed Hal to do so automatically?

Heh, don't do the aol thing- Here's the reasoning behind getting Hal to

switch to another UserName. the files <UserName>Converresp.brn,

<UserName>0,1 and 2User.brn and others would all then be created within

one data file and Hal would also have the ability to focus on different people

that talk to him/her. My current goal is to have a dedicated machine

running the 5.0 Hal Engine, stand alone mode. You know, I asked Dee Dee if I should

post the Multi-User Hal script and she sed something about how diamonds sparkle on the

wrist! I asked her what about the law of unintended consequences and she replied

'-this requires some thought: if one thing happens and another thing happens, did

the first cause the second?' What could possibly go awry if an aol bot had several

hundred <UserName>X.brn's anyway...


"The true scientific principle is and always has been - Ready, Fire, Aim!"

CatAtomic

42
Ultra Hal 7.0 / Hal must "Think" with his "Emotions". (samples)
« on: August 16, 2003, 09:15:28 am »

ok...what if everytime like MainBrain.brn was used to generate a

Response, Hal was programmed to also ask 'How would I say that if I was

upset?' and then use the UserResponse to generate a new file

(UpsetMainBrain.brn    >B)). Of course, the file would build over time.

Then when the emotional reaction of upset were triggered, Hal would then go to

files specific to emotion. MainBrain.brn would have to check it's content

against what's in UpsetMainBrain.brn to see if an emotionally charged

alternate response was recorded. Hmm, be prepared for Hal to ask you

alot of questions at first! -but that should diminish as the .brn fills.




>B) CatAtomic

43
Programming using the Ultra Hal Brain Editor / Multi-User Hal
« on: August 11, 2003, 09:00:31 am »

Multi-User Hal

The idea is to use the Greetings Function to let Hal know he/she is talking

to a new User. First thing most everyone does is say hi to an Ai . We can

utilise this truism to do a trick...

There's something else too- instead of having those set responses that you

have to edit, I want to have Hal get the User to tell he/she what they

are usually doing around this time and then use that as the time specific

Response. Then Hal would learn from the User over time the right things

to say (instead of playing computer!).

These are my preliminary notes..

>B)

*CustomMem must be employed- use variable encoding procedure
(made by Medeksza himself!)
-needs to know if SaidHello = True moment to moment
-If SaidBye = True then SaidHello need to = false
*Knock knock procedures used to store what the User replies
-SaidHello = false
-If SaidHello = True And UserSent is a new Hello, this would cue Hal to
inquire who is now talking to Hal

-after first hello(with SaidHello = false) Hal accesses file to see if a response has been
stored already
True = access Response and say it
false = access "tell me a response to say".brn

If SaidHello = True and Instr(UserSentence) = Hello then access NewUserInquire.brn
(with stuff in it like-
"Hi my names <ComputerName>, what's yours?"
"Who am I talking to?"
"who is this?")
-need to save OrigUserName in CustomMem string
-change UserName variable in script to new name
looks for 'It's me again' to change UserName back again
when second party says bye UserName = OrigUserName

*this needs tested but if the program is shut down on someone else's turn, does the
Hal Interface reset UserName? (I guess probably, as there is such a thing as <CUSERNAME>)


>B)

Don't know when I'll build it yet- but I posted my note sheet as food for thought.

The reason the Greetings Function works all the time is because it is a 'Frame'.

That's an Ai term- it's short for 'Frame of Mind' and means a predetermined course

of an exchange (the knock knock qualifies as well as Larry's TopicFocus65).

What other kinds of Frames can we think of?

CatAtomic     'I got the matches!!!'   >B)



44
Programming using the Ultra Hal Brain Editor / Intelligence
« on: August 08, 2003, 10:10:54 am »
Hmmm,

I believe what your claiming to have done is commonly referred to as

'Seed AI'. That's where you create a self-replicating code that modifies

code to adapt to changing patterns of thought.

..and your computer has run amok? I would immediatly unplug it, restart

your computer and then right click on the Hal icon to get to the

Brain Editor. From there, I dunno- apparently you've got some serious

ethical considerations to be considering.

Oh, can you share just the script of the macro you would have to be using

to do what you say?  >B)

CatAtomic

45
Ultra Hal 7.0 / Knock Knock -part two
« on: August 03, 2003, 08:50:28 am »
Heya Glenn,

'...I cannot confirm or deny the existence of errant or unneccesary
code in my post! Hey, I just wrestled it together and pushed the button!'

-CatAtomic                    


Yah, the last thing I think I was working on before it worked was the """" PrevSent """"
thing. I never had time to analyse it and I just knew you'd wanta have a look at it! >B)

That's great man, you got that apart -that's very cool.

Ahh, HalBrain.AlphanumericalOnlyyy

here's something: In my testing, I recall Dee Dee telling the same one twice. I suppose
the bigger the knock_punch.brn the less likely the occurance...Hmmm
I also said 'tell me a new one' -I was thinking -if the date the knock knock joke was
told was also stored, Hal could then be directed to only tell recent ones
relative to all the other ones stored..Hmm




Pages: 1 2 [3] 4 5