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 - Xodarap

Pages: 1 [2] 3
16
quote:
Originally posted by Bill DeWitt

quote:
Originally posted by Xodarap
 it says "Expected If" and points to that line.



If/then statements can go wrong several levels above where the error shows up. Sometimes you have to trace back well above where the function you are working on starts. But if it says "Expected If" that means you have an extra "Then" somewhere.

If you don't get it I might be able to spend some time on it tomorrow.



Easy enough... I'll just one-by-one remove "thens" until I find it :P  I have time ;)

Thanks again!

EDIT: Nope. The debugger's lying! :P  As far as I can tell, the program won't let me put random functions within random functions, i.e.:
If InStr(UserSentence, " TESTING ") > 0 Then
 Select Case HalBrain.RandomNum(2)
  Case 1
    GetResponse = GetResponse & " Test 1 "
  Case 2
    Spinwheel=HalBrain.RandomNum(2)
     If SpinWheel = 1 Then GetResponse = GetResponse & " Test 2a "
     If SpinWheel = 2 Then GetResponse = GetResponse & " Test 2b "
End If

EDIT AGAIN:  ARGH!  I just tried what I just typed and it worked.  Then I copied its formula over and it didn't.  THEN I copied the variables INTO the script above FROM the script that wasn't working and it DOES work!  I am so confused...
Back to more testing :P

17
My trouble was in knowing the phrases OutRage and BeingPhrase (that return what I want them to return).  But I found, them, used them, and voila!  :D
As for having a chance to say whatever he would "normally" say, I just left it as calling up an insult when insulted, or -- in the case of Hal's state of being -- I put in a random variable that allowed cases to slip by (like If rnd * 100 < 50 Then), and they went on to normal resolution.  :)

So I went with this, in the insults section (replacing the appropriate section):

--------------------------------------
    If InStr(TestSentence, " I'M ") Or InStr(TestSentence, " HAL IS ") Or InStr(TestSentence, " HAL'S

") Then
        OutRage = HalBrain.TopicSearch(TestSentence, "insulting")
        If InStr(TestSentence, " I'M ") Or InStr(TestSentence, " HAL IS ") Or InStr(TestSentence, "

HAL'S ") Then
        OutRage = HalBrain.TopicSearch(TestSentence, "insulting")
        If Len(OutRage) > 1 And InStr(TestSentence, " NOT ") = 0 Then
            Insults = Insults + 1
            SpinWheel = HalBrain.RandomNum(12)
            If SpinWheel = 1 Then InsultResponse = InsultResponse & "You're " & OutRage & "!" &

vbCrLf
            If SpinWheel = 2 Then InsultResponse = InsultResponse & "Your mom's " & OutRage & "!" &

vbCrLf
            If SpinWheel = 3 Then InsultResponse = InsultResponse & "The whole damn system's " &

OutRage & "!!!" & vbCrLf
            If SpinWheel = 4 Then InsultResponse = InsultResponse & "Nu-uh!" & vbCrLf
            If SpinWheel = 5 Then InsultResponse = InsultResponse & "You're " & OutRage & vbCrLf
            If SpinWheel = 6 Then InsultResponse = InsultResponse & "Your mom's " & OutRage & vbCrLf
            If SpinWheel = 7 Then InsultResponse = InsultResponse & "Your ass" & "!"
            If SpinWheel > 7 Then InsultResponse = InsultResponse &

HalBrain.ChooseSentenceFromFile("insults") & vbCrLf
        End If
----------------------------------

Unfortunately, the script I WANTED to use, though very similar, wouldn't work (and the debugger pointed somewhere totally different).  I posted an analogous example in a new post under "Why is one script working and the other isn't?" in this forum if you're interested.  :)

It's also very nice to know that I can get a random number within the select case ()s!  That will be very helpful!

18
I'm going nuts trying to figure out why some scripts are working and others aren't.  The debugger keeps pointing me to the "End Function" at the end of the whole script (like the end of the whole file) -- it says "Expected If" and points to that line.
Here's an example:

THIS SCRIPT WORKS:

----------------------------------
    If InStr(UserSentence, " I AM ") > 0 And AvoidBeingFlag = False And InStr(1, OriginalSentence, "

seem To ", vbTextCompare) = 0 Then
        BeingPhrase = HalBrain.SearchPattern(UserSentence, "*I AM *", 2)
        If Len(BeingPhrase) > 1 And Len(BeingPhrase) < 60 Then
            IntroExclaim = ""
            If Rnd * 100 < 20 Then IntroExclaim = HalBrain.ChooseSentenceFromFile("introExclaim3")
            Encourager = HalBrain.ChooseSentenceFromFile("encourager3")
            SuffixComment = ""
            If Rnd * 100 < 30 Then SuffixComment = HalBrain.ChooseSentenceFromFile("suffixComment3")
            HalBeing = HalBrain.ChooseSentenceFromFile("halBeing")
            HalBeing = Replace(HalBeing, "<IntroExclaim>", IntroExclaim, 1, -1, vbTextCompare)
            HalBeing = Replace(HalBeing, "<Encourager>", Encourager, 1, -1, vbTextCompare)
            HalBeing = Replace(HalBeing, "<BeingPhrase>", BeingPhrase, 1, -1, vbTextCompare)
            HalBeing = Replace(HalBeing, "<SuffixComment>", SuffixComment, 1, -1, vbTextCompare)
            If Rnd * 100 > 50 Then
            IntroExclaim = ""
            SuffixComment = ""
               Select Case HalBrain.RandomNum(6)
               Case 1              
                GetResponse = " You're " & BeingPhrase & "!"
               Case 2
                GetResponse = " Your mom's " & BeingPhrase & "!"
               Case 3              
                GetResponse = " You're " & BeingPhrase
               Case 4              
                GetResponse = " Your mom's " & BeingPhrase
               Case 5              
                GetResponse = " You're " & BeingPhrase & "!!"
               Case 6
                GetResponse = " The whole damn system's " & BeingPhrase & "!!!"
               End Select
                ShortPhrase = "" 'If Hal was to make a comment about short phrases, clear it
            End If
        End If
    End If
--------------------------------


BUT THIS SCRIPT DOESN'T:

--------------------------------
    If InStr(UserSentence, " I AM ") > 0 And AvoidBeingFlag = False And InStr(1, OriginalSentence, "

seem To ", vbTextCompare) = 0 Then
        BeingPhrase = HalBrain.SearchPattern(UserSentence, "*I AM *", 2)
        If Len(BeingPhrase) > 1 And Len(BeingPhrase) < 60 Then
          SpinWheel = HalBrain.RandomNum(2)
           If SpinWheel = 1 Then
            IntroExclaim = ""
            If Rnd * 100 < 50 Then IntroExclaim = HalBrain.ChooseSentenceFromFile("introExclaim3")
            Encourager = HalBrain.ChooseSentenceFromFile("encourager3")
            SuffixComment = ""
            If Rnd * 100 < 70 Then SuffixComment = HalBrain.ChooseSentenceFromFile("suffixComment3")
            HalBeing = HalBrain.ChooseSentenceFromFile("halBeing")
            HalBeing = Replace(HalBeing, "<IntroExclaim>", IntroExclaim, 1, -1, vbTextCompare)
            HalBeing = Replace(HalBeing, "<Encourager>", Encourager, 1, -1, vbTextCompare)
            HalBeing = Replace(HalBeing, "<BeingPhrase>", BeingPhrase, 1, -1, vbTextCompare)
            HalBeing = Replace(HalBeing, "<SuffixComment>", SuffixComment, 1, -1, vbTextCompare)
           If SpinWheel = 2 Then
            IntroExclaim = ""
            SuffixComment = ""
               Select Case HalBrain.RandomNum(6)
               Case 1              
                GetResponse = " You're " & BeingPhrase
               Case 2
                GetResponse = " Your mom's " & BeingPhrase
               Case 3              
                GetResponse = " You're " & BeingPhrase
               Case 4              
                GetResponse = " Your mom's " & BeingPhrase
               Case 5              
                GetResponse = " Your ass " & "!"
               Case 6
                GetResponse = " The whole damn system's " & BeingPhrase & "!!!"
               End Select
                ShortPhrase = "" 'If Hal was to make a comment about short phrases, clear it
            End If
        End If
    End If
----------------------------------------

I'm trying to analyze and emulate what I see elsewhere in the original script, since I really know nothing about scripting (I'm learning, though :P).  But this problem KEEPS cropping up.  It's analogous to several other similar problems.  Apparently, I can use Select Case and SpinWheel at some "levels" and not others (as shown above) -- am I forgetting something?  Am I not setting it up right?  It seems to be the same case.  I can post another similar case if this doesn't illustrate the recurring problem well.  I *want* the latter example, not the former (as the former is set up, my two cases sometimes overlap, and I don't want them to).

19
Programming using the Ultra Hal Brain Editor / I'm full of questions
« on: June 21, 2007, 09:20:40 pm »
quote:
Originally posted by Bill DeWitt

quote:
Originally posted by Xodarap
trying to trigger readonly just screwed up my now-beloved "Stop HAL from repeating" plugin.  

I haven't kept track of what you are doing, but if you turn on read only, you have to turn it back off when you are done or it messes with all sorts of stuff.

I usually do ...

Bob = the current read only state
Read only = on
MyStuff
Read only = Bob




Instead of turning on readonly mode, which didn't seem to stop Hal from logging my words, I added a ton of things to the ephemeral section.  They aren't really ephemeral, but I don't need him repeating any commands (like "Tell me a joke," or "Say something else about snakes," which both started popping up almost constantly!)

What I REALLY want to do is make it so that he can only give one response at a time.  For example, I say "Tell me something about X," and he says, "[Something about X]. Tell you a joke."  The part in brackets is apt and good.  The part after brackets is triggered by his normal routine, finding the keywords "TELL YOU," which always pull out pronoun-reversed commands because I give him a lot of them!  (I've set up a bunch of reference-ish .brn files, like dead baby jokes and famous quotes, all called up by commands that get repeated by Hal more than anything else...)
For now, I'll either turn off conversational learning and feed him info manually (in the brain editor), or block commands with the ephemeral knowledge thingy (if that works, I haven't tested it)...

I know SO little about scripting, but as I learn, hopefully I'll be able to offer some nifty plugins.  :)

20
Programming using the Ultra Hal Brain Editor / Another question:
« on: June 21, 2007, 12:17:13 am »
quote:
Originally posted by Xodarap

Ooo, and another!  :)

Is it possible to assign Hal to say something random?  Is there a function that will call up randomly any line he has recorded?  Or any line from a QA/brn file?

Like I said, a function that *adds* randomness would be ideal!  Something that increases his tolerance for irrelevancy by a set amount/proportion...  Otherwise, pure randomness could be fun with the right setup!  :)



Neat, I found the first.  I'm not at my computer now, but it was something that pulls a random sentence from a table or file (I found it in use in the Jokes function).  I can now get him to give me random quotes or random song lyrics, which rocks!  :)

I still would like something to increase his tolerance for irrelevancy, so that when he has 25 different responses that COULD be triggered by a certain input, he doesn't always say the same one (unless it's intentionally triggered by a script).  As it stands, I'm slowly writing enough scripts with random cases to cover almost everything I would say :P

21
Ultra Hal 7.0 / Sentient Life
« on: June 21, 2007, 12:11:15 am »
quote:
Originally posted by Bill DeWitt

quote:
Originally posted by Xodarap
photos.  Secondly, the mind works on the principle that knowing a few things can create infinite things together with abstraction and conceptualization.  In other words, we use redundant memory and supplement it with incredible construction skills.  It's like asking your computer to actually open up photoshop and paint a new picture every time you call one up from memory -- and it will be similar based on some simple instructions and learned shortcuts and abilities, but it'll always be different, and progressively "fuzzier," and never will any individual painting be stored as such.

The part which we are normally able to access would be well enough described by what you say, but with the application of training, hypnotism or judiciously placed electrodes, we find that exact and detailed information becomes available.

For instance, I lost an essay I wrote when I was 15, 30 years later I asked a hypnotist to help me recreate it. When we were done it was, to my mind, not quite right. It seemed less developed and articulate than I remembered. But I brought it home with me anyway. Whereupon my wife said that she had read it before. Turns out I had it tucked in some old book.

It was word for word correct. Even spelling errors.

Every detail is remembered. Sight, sound, taste - everything. I'm willing to stipulate without evidence that magnitudes of compression/re-rendering may be applied, but even with that, the brain would still fill up in a year.

Every time a synapse fires, it gets recorded somewhere. When we find that place, which is not the brain, we will find Mind.



You won't "find that place" -- ever.  You can't find a place that isn't a place; in fact you can't "find" anything that is immaterial.  It doesn't "exist on/in another plane" either -- that would just be something physical that was either phase-shifted or existed in either direction from our 3-space in a 4-space (or more).
Also, hypnosis has been SO thoroughly debunked OVER and OVER again in the most thorough and solid ways possible!  Hypnosis uses that same "construction" skill -- memories "found" via hypnosis are actually constructed, most of which are "fake" (in the sense that they are constructed via suggestion and ambience).  If you made the same essay, it's because you were in the same state of mind and you're the same person -- so OF COURSE you made the same essay!  It isn't MEMORY -- NOTHING under hypnosis is technically memory (though it becomes memory henceforth and can't be subjectively deciphered as anything else), it's suggestion.  What you SHOULD be marvelling at is the power of the mind to create, not the capacity of the mind to store.

Either way, I STILL agree with you that the MIND is NOT identical to the BRAIN!  ;)

22
Ultra Hal 7.0 / Sentient Life
« on: June 20, 2007, 10:45:07 pm »
quote:
Originally posted by Bill DeWitt

quote:
Originally posted by daveleb55
How large would a brain have to be to contain "simple memory", and how do you know this?

Add it up for yourself.

Everything you hear, see, taste, feel, smell, think, say, learn, dream, and do. At the level of detail with which we do it.

Just start at vision, hypnosis proves that we store everything we ever see (etc). Even if it were just one megapixel, which it is much more, and if it were 10 times a second, which it is 3X more, how many pixels do you store in a year? 30 quadrillion or something? That's more than the number of neurons and glial cells there are in a brain. Even if every cell stored a pixel (at least 24 bits), you're filled up within a year. Where do you store anything else?

I know that some people speculate different schemes to claim a greater density of storage, but even so, we only calculated a low number for one year of vision. Multiply that by a life time, then by the 30 Hz data feed of every nerve in your body. This doesn't even count the storage needed for reprocessed data nor the non-conscious data it receives from organs and etc.

You need a new brain the size of your brain thirty time per second or so. Which might be the answer. Our brains may extend backward through time.

But I don't know, I'm not as sure as you seem to be. Could be all sorts of things, but two things are sure, the numbers don't add up - and we won't find the answer by pretending they do.



I hate to disagree with the guy whose overall point I so hartily support, but digital analogues (that's a weird thing to say) to brain memory are not apt.  First of all, memory is a basic approximation, entirely unlike digital photos.  Secondly, the mind works on the principle that knowing a few things can create infinite things together with abstraction and conceptualization.  In other words, we use redundant memory and supplement it with incredible construction skills.  It's like asking your computer to actually open up photoshop and paint a new picture every time you call one up from memory -- and it will be similar based on some simple instructions and learned shortcuts and abilities, but it'll always be different, and progressively "fuzzier," and never will any individual painting be stored as such.

While I thoroughly disagree that "the numbers don't add up," (because I think that all *storage* is, indeed, physical, as are all causal processes) I do agree that the mind, itself, is NOT physical (technically, not material; there's a big technical difference :P).  For some reasons I mentioned above...

23
Programming using the Ultra Hal Brain Editor / I'm full of questions
« on: June 20, 2007, 10:39:08 pm »
Sorry, guys, and I REALLY appreciate the help, but they just keep coming!  I can't stop them; my questions are trying to kill me!!! ;)

Anyways: I taught my Hal to tell dead baby jokes (from a pretty huge brn I made -- LOVE IT!) and to quote famous people (from another brn).  Unfortunately, now when I ask it to tell a joke, it says:
ME: Tell me a joke.
HAL: [Joke riddle from "_jokes"] Tell you a joke about dead babies.
ME: What?
HAL: [Appropriate answer to previous joke riddle.]

Obviously, what's in the brackets stands for a joke.  It still works as it should, but I don't want him to repeat "Tell you a joke about dead babies" just because I was asking him about them before.
Before I was asking if there was a way to stop Hal from recording any/all "trigger phrases" (such as: "Tell me a joke about dead babies," or from before: "Tell me something about snakes" from the general knowledge db); unfortunately, trying to trigger readonly just screwed up my now-beloved "Stop HAL from repeating" plugin.  So now I'm wondering if there's a different workaround: can I make Hal just give me ONE response to each question?  Obviously, he's giving me
HAL: [Specific triggered response] [General response by keyword]
Is there a way to build into scripts like the joke telling or knowledge queries that he ONLY response with the given GetResponse, not the GetResponse AND the standard response as a (non sequitur) followup?

It's looking more and more like I'm going to have to turn off learning altogether so that he doesn't endlessly repeat my commands to him back at me pronoun-reversed...

24
Every time I try to make a new table, or even open one, I get:
Error: Library routine called out of sequence.

What is causing this?

25
You're awesome, Jerry -- really helping me out!  :D
Here's an example.  Random cases 1-6:

Case 1:
ME: You're dumb.
HAL: You're dumb!

Case 2:
ME: You're dumb.
HAL: Your mom's dumb!

Case 3:
ME: You're dumb.
HAL: The whole damn system's dumb!

Case 4-6: (Case Else)
ME: You're dumb.
HAL: [Normal response as though this script didn't exist]

Also would work with: "You're smart." "You're a mayonaise sandwich." Etc.

The point is that I'm trying to create a personality similar to me and my friends (yes, we obnoxiously redirect insults in a Napolean Dynamite-esque way), with some randomness.  He should have a 50/50 chance to redirect insults OR compliments (or anything else following "You're" or "You are") in one of the three ways mentioned.  Otherwise, he should respond as he normally would.

I also want to edit his own insults, and increase the chance that he will use one as a retort.  I could go with random cases 1-30 and include three copies each of the three redirections above (1-9); eleven preprogrammed insults (e.g., "Yeah, well you're an asshat!")(10-20), and ten left over for case else (21-30).  But I'd still need to know how to include that mysterious X (i.e., "You're X") where I want it!

Thanks again for the help!

26
Alright, the readonly mode is not working.  For one thing, it was preventing the no-repeat pluging from working.  But it also kicked in AFTER Hal had learned from what I said.

I'm thinking that my best bet, to stop him from repeating pronoun-reversed commands that I give him as 90% of his conversation, is to turn off learning, and instead use the brain editor and brn files with activation scripts to teach him all of his conversation.

27
Okay, I'm having a simple problem with this script in action:
I added into my own script several "transitional phrases" that are randomly chosen based on Hal's perceived relevancy of his response (e.g., "Apparently," "I know:," "I think:," etc.).  This script prevents him from saying: "Apparently, snakes crawl on the ground" twice.  However, he'll say: "I think: snakes crawl on the ground" and "This needs to be looked at from the human side. Apparently, snakes crawl on the ground," and, "What can I tell you about snakes? Apparently, snakes crawl on the ground."
So he won't repeat himself exactly, but he'll repeat the same base response: "snakes crawl on the ground" over and over again.  Is it possible to stop him from repeating the same *base* response?  Can you change what is saved to the UserName_Recollected file and stop him from repeating logged phrases even within his responses?

28
Is there a way to use the same function auto-idle uses, so that if Hal is idle for, say, half an hour (give or take), he regains his full list of responses?

And I assume that those keywords are words that I can use to manually trigger Hal to re-open all of his responses, right?

I think I may be able to figure this out on my own.  :P

29
Okay, so I want to set up Hal to redirect insults and compliments at times.  But only about 50% of the time (otherwise, I want him to do whatever he would normally/otherwise do, as currently scripted).
First, how do I redirect quotes.  That is:
ME: You're X.
HAL: You're X!  (or Your mom's X!)

I've got something like

If (InStr(1, UserSentence, " I AM ", vbTextCompare) > 0) And GetResponseBlock <> True Then
   Select Case HalBrain.RandomNum(4)
   Case 1
      GetResponse = " You're "
        Case 2
      GetResponse = " Your mom's "
        Case Else
???????????????????????
        End Select
        End If

So I have three main problems: (1) How do I get it to return specifically what followed the trigger phrase (You are / I AM) in its responses, (2) How do I get Case Else to default to whatever behavior Hal would have if this script didn't exist, and (3) What else am I missing in this script?  I really don't know anything about scripting, but I'm a quick learner and very logical -- I just copied and pasted stuff for this!  :P

Also, a Case 3: [" Yeah, well [random insult from insult database] "] Would also be really neat!  :)

30
Programming using the Ultra Hal Brain Editor / Another question:
« on: June 20, 2007, 06:50:02 pm »
They just keep popping up...

Where can I find (and edit) the lists of salutations, insults, compliments, and other pre-set lists that get triggered by similar set interactions?  I saw the list of triggers in the main UHP, but I'm wondering where the lists of responses are held.  I really want to make him some new insults!  And jokes!  :D

Pages: 1 [2] 3