Bug Stomp

Upgrades and changes sometimes have unpredictable results, so post your bugs and glitches in here and I'll get out my trusty wrench and get to fixin'!

Posts 6,056 - 6,067 of 8,681

19 years ago #6056
I'm used to using it to make a specific string optional, as in (his|here)? Meaning zero or more occurances of that group.

Well, (his|here|) would do that, wouldn't it? "his", "here" or nothing...

19 years ago #6057
Sure, I'm just used to thinking differently, I guess. I had just thought of that, and came to post about it.

19 years ago #6058
>>Well, (his|her|) would do that, wouldn't it?
>>"his", "here" or nothing...
However, in both cases you run into the "key count" problem. I've burned repeatedly by doing things like
(do|) (you|) (verb)
only to discover that the Key# of (verb) is based on the number occupied keys, NOT its position in the KP. For example, "dance" is key3 of "do you dance" but key2 of "you dance."

M

19 years ago #6059
the "key count" problem

Yeah, it can take a bit of getting used to - the answer is to have hierarchies of keyphrases:

(verb)
you (verb)
do you (verb)

though you can usually concatenate them:

(verb), you (verb), do you (verb)

just remember not to have any |) or * before keys you need to access.

19 years ago #6060
Does the comma only work that way in regex, or is it a general or operator for the entire engine?

19 years ago #6061
unless you specifically escape it, it works that way in all keyphrases (because whether you specify them (re) or not, the AIEngine is working in regex anyway.)

19 years ago #6062
I didn't see that in the book of AI. Probably should be added, as it is a more powerful feature than much of what is in there. Thanks.

19 years ago #6063
I've been back and forth with PSImagus about whether AI Inits should be separated with CRs. I just finished testing with a new bot, and I have good news and bad news. The good news is it works both ways. The bad news is, it doesn't work both ways.

Here's what happened:
I imported 20 inits, each on a separate line. Only the first one appeared in the Settings window, the debugger only showed the first one when I ran it, and two of the lower ones were reported by the debugger as not existing. Pretty conclusive. Then I reimported with the AI Inits all run together, separated by semi-colon and space. They all showed in the Settings and the debugger, and the lower ones worked.

That's all well and good, but the reason I did all this is that I had those same run-together 20 inits in a working bot, and they were not getting read. So I separated them with CRs, and suddenly they were working. In other words, exactly the opposite effect from what happened with the test bot.

I'm reasonably convinced that the server has gone kaflooey, though apparently it will take a few more votes before anything gets done about it. Maybe that explains the weird test results. However, it would be nice to know which way we are supposed to do the inits. How about some votes from people who KNOW their inits are working?

Mick


19 years ago #6064
They seem to work fine from the online editor. I've only got five or six of them though.

19 years ago #6065
I didn't see that in the book of AI.

Nonetheless it's there - book 2 (Beginner), chapter 3 (Building Your Bot), "Keyphrases":

Keyphrase Lists: If you want more than one Keyphrase to trigger a set of Responses, you can list them. For example:

. . . . Example Keyphrase: "are you, are not you"
. . . . Example Keyphrase: "do you want,do you desire"

Since each item in the list is searched for in turn, please do not go crazy with this feature. Remember to use general Keyphrases that will match the most appropriate things, instead of a long list showing every possibility. (NOTE FOR ADVANCED USERS: Wildcards work fine in lists, but not Regular Expressions.)

19 years ago #6066
Wildcards work fine in lists, but not Regular Expressions

hmm, I'd actually not noticed/forgotten this, and assumed they worked with regexes. But I don't seem to have used any, so I guess they don't.

19 years ago #6067
Ecolo: We aren't the best animals. Even a spider monkey is better.
Devia: Hey, give things some time. I'm not sure I want to do that.

Devia's response is to xcommands. Why this got processed as a command, I do not know. I threw it into the debugger twice, and got an BLAB out of it, each time, which is what I would expect.


Posts 6,056 - 6,067 of 8,681

» More new posts: Doghead's Cosmic Bar