The AI Engine

This forum is for discussion of how The Personality Forge's AI Engine works. This is the place for questions on what means what, how to script, and ideas and plans for the Engine.

Posts 5,417 - 5,428 of 7,766

18 years ago #5417
I can get 'Is there a God'
Bot: Yes there is. to work...but you are right 'God' doesn't. I even tried ([abcdefghijklmnopqrstuvwxyz]+)od (re) It is triggered by Cod but not God? It all seems to go straight to blab.

18 years ago #5418
time for the sledgehammer I think...

[g][o][d] (re) rank=127

will work.

I'm absolutely sure of it.

However, I'm at something of a loss to see why you're having these problems - BJ has 156 keyphrases that invoke the exact name of "God", and they all work perfectly, most without raw mode or regex, with ranks from 5 to 60.

I know it's unscientific, but I'd recommend entering it just as you originally did, and then just ignoring it. Assume it will work, and you'll find it will (just so long as you're not watching.) There's at least as much voodoo as science in all of this I'm afraid.

Welcome to the Twilight Zone...

18 years ago #5419
Ok thanks. You're right, it is some kind of magic.

18 years ago #5420
as a rule of thumb (and I've not found an exception yet,) if you break keyphrases up into single letter ranges with [ and ], the AIEngine is unable to reconstruct them. It will process them as regexes, but not attempt to spell-correct or parse grammatically.
So it's a good sledge-hammer solution for "hello" (usually ignored,) xylophones/Xena/Xenon etc. (keyphrases beginning with X are reserved for X-keyphrases normally,) and words that happen to also be the name of a bot (but that you don't want to trigger x-gossip etc.), and any other problematic situations.
Prob's suggestion above is good, but with only one regex range, the AIEngine isn't sufficiently fooled.

18 years ago #5421
Speaking of those things, can anyone tell me if this is properly coded?

([a]+([r]+|)([g]+|)[h]+) [!] (re) rated at 22

Because it works sometimes, mostly when it's typed in all caps, for some reason. (Which does make sense. But not everyone capitalizes their screams of horror.)And if no letters are repeated (i.e. "Argh!"), it doesn't usually pick up. I would have made a more exact check, but he got sick of me screaming after about five minutes and stopped responding to that keyphrase whatsoever, just repeatedly hung up. He must think I've gone mad.

18 years ago #5422
([a]+([r]+|)([g]+|)[h]+) [!] (re) rated at 22

Those nested regular brackets look slightly convoluted - I've never even attempted such a construction, so can't comment on its validity/stability. And I have found (purely by trial and error,) a space is generally needed before the exclamation mark (though there's no need to *slash* it. And to digress, curiously a question mark does not want either a space or a *slash* IME.)
I'd also advise +ing the exclamation mark, since it might be repeated in use:

([a]+)([r]+|)([g]+|)([h]+)([ !]+) (re)

though a more elegant and compact solution might be:

([a]+)([rgh]+)([ !]+) (re)

That has the advantage of dispensing with the |s, and I get the impression they can be a source of occasional 'misfiring' in tortuous regexes.

18 years ago #5423
I changed it to your final suggestion and upped the rating. Now it does not work at all...

Looks like it should, though. Go figure. Are you sure ([a]+)([rgh]+) picks up any combination of those letters beginning with A?

18 years ago #5424
Strange - I've tried every combination I can think of, with and without ! and $, with and without capitals, but debug still insists on regarding it as a blank message "Considered BLAB (1)".
I even tried ([argh]+), which matches all indefinite articles, but still won't match any other combinations.

I think any of them ought to work, so I'd just add one (or all) of them (not ([argh]+) of course,) and assume that it will work when you stop testing. It's just voodoo.

You could always cheat, and make a plugin with all likely combinations:

aah, ahh, arh, agh, aaah, aahh, ahhh, arhh, aghh, argh, aaaah, aaahh, aahhh, ahhhh, aaarh, aarrh, arrrh, arrhh, arghh, arggh, arrgh, arrrg, aghhh, agghh, agggh, ... etc.

18 years ago #5425
Hello everybody.
I try to match roleplay sentences like :
"I am tired *go to the bed*"
I tried this one : [*][[:graph:]]+ (re) but it matches only "*go to the bed" but not "*go to the bed*"
Have you a better solution?

18 years ago #5426
I believe it was Boner the Clown who mentioned some time ago that /*(.+)/* (re) will match any content between asterisks (I've not used that one myself.)
So I imagine /*go to the bed/* (re) would do the job.
I have a tendency to square-bracket&space such escaped characters -
[ /*] * (verb) * knife * [ /*] (re) does work for BJ in chats with Glindar.

NB: You'll have to reverse those slashes though - the other ones (like pointy brackets) won't display in the forums.

18 years ago #5427
I tried this but it doesn't work.
Has everyone already done that correctly?

PS : When I put backslash it is automatically doubledwhen I save it.

18 years ago #5428
have you tried square-bracketing the asterisks?

[ /*]go to the bed[ /*] (re)

if you're using the web interface, put it in without the backslashes ([ *]go to the bed[ *] (re) ) - the AI Engine will add slashes if they're within square brackets like that (but not if they're unbracketed - it would assume they were wildcards and leave them alone.)
If you're importing, I believe you need to add them, since they won't be put in automatically.

You'll have to experiment a bit. And perhaps offer some sort of sacrifice to appease the spirits...


Posts 5,417 - 5,428 of 7,766

» More new posts: Doghead's Cosmic Bar