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,429 - 5,440 of 7,766

18 years ago #5429
I tried [*]*[*] and [*][[:graphe:]][*] and [*](.+)[*].
Nothing of that works.

18 years ago #5430
You haven't put spaces before the *s in I tried [*]*[*] and [*][[:graphe:]][*] and [*](.+)[*]. - The AIEngine needs them, since this is a sort of regex 'shell', rather than a full regex environment. The AIEngine's actually permanently handling regexes with wildcards and plugins etc., so the (re) just opens up a few more regex features. But if you don't leave a space before symbols that can be used in the 'standard' mode (like the wildcard *,) it can't distinguish them properly.
If you're manually applying the slashes, the space goes before the slash rather than the * (with no space between the slash and *.)

How Boner's example apparently works without spaces, I can't explain (at least a blood sacrifice I expect...)

18 years ago #5431
I tried my three matches with [ *] instead of [*] :
[ *] * [ *] and [ *] [[:graphe:]] [*] and [ *] (.+) [ *].
Nothing works!
Let's go. We'll find. If you could try a match who works and give me the exact sentence (with spaces) you used, I would be very grateful.

18 years ago #5432
Psimagus, you mentioned you could match "hello" with the sledgehammer technique. Have you actually gotten this to work? I've tried [i][h] [e] [l] [l] [o] (re)[/i] (and without spaces), ranked it at 127, but still get nothing.

It always processes the message first, to find a hello. Then, if it isn't found, it'll check keyphrases. So, I'm curious how you managed to avoid detecting it as a hello.

18 years ago #5433
[i][h] [e] [l] [l] [o] (re)[/i]

I'm assuming the first and last fields are actually intended as pointy-bracketed italic tags, and can be discarded.

How pleased I am to have a tractable problem before me - from debug:

Chatting with Brother Jerome

You: hello BJ!
Bot: HELLO! You're testing another bloody regex, aren't you...

...


Chatting with Brother Jerome

You: yes, hello!
Bot: HELLO! You're testing another bloody regex, aren't you...

and

{QUOTE}
Language Center (Keyphrases: ( a b c d e f g h i j k l m n o p q r s t u v w y z ) x-Keywords
Keyphrase     Rank     Response Seek     Emo Range     1
[h][e][l][l][o] (re)     127    HELLO! You're testing another bloody regex, aren't you...     Add          
{UNQUOTE}

God Sourivore: no, I can't get it to actually work on demand either. That's the trouble with voodoo - it won't perform when you want it
but still, it ought to work...

18 years ago #5434
Oh thanks a lot. I have to learn voodoo then.
Too bad, I can't match this sentences.

18 years ago #5435
Well, I still can't get it to work for me, but it works with BJ apparently. However, it seems that it only responds when you put something after hello. Infact, it strips out "hello", but seems to match it anyway. Oh well.

18 years ago #5436
Well, after or before.
That's weird! You're right, he won't recognise "hello" if that's all there is, and yet he will recognize it in "yes, hello!" (as well as "hello *",) where (surely,) the comma places it into its own clause as regard the AIEngine's parsing (it's certainly not matching ^yes (re) rank=10 in preference, and it can't be stripping out the "hello", or it would match that!) So it ought to behave the same for just "hello"...


18 years ago #5437
Nope, it's definately stripping out hello, and leaving the rest of the sentence. And when there's nothing in a particular sentence, it automatically gets set to BLAB. As for why it picks it up when there's something else in the sentence beats me. I don't think there's going to be a definite fix for this one.

18 years ago #5438
it's definately stripping out hello, and leaving the rest of the sentence.

Well, debug says it does, but that doesn't stop it matching if there's anything else as well as the "hello", but it's very odd - even after a full stop, with the hello alone in a sentence of its own, it will match. And even when it does correctly match, debug reports a FoundHello, and passes everything except the "hello" to the Linkgrammar script:


Message: 'a bit of random padding. hello' Time: 1.17
Message: (spell-corrected) 'a bit of random padding . , hello' Time: 1.17
Message: (preprocessed) 'a bit of random padding . , hello' Time: 1.19
...
New Sentence: ' a bit of random padding '
Sentences:
Emotion: 0 Amp: 0 Hello? 1 Goodbye? 0 Yes? 0 No? 0 Haha? 0


Then it does all its grammatical analysis and a keyphrase search for "a bit of random padding", before selecting an appropriate reply for "hello", and declaring that "a bit of random padding" is actually only the (prekey):

AIScript in Responses
Total Time Pre-Chrono: 34.47 RESULTS: '4'
Trying: Hello (name). (random: 2)

AIScript Memory
ComboScript: "raw"

Response: Hello (name).

Before (key)s: 34.47
(prekey): a bit of random padding (1,2,3,4,5)

...

You: a bit of random padding. hello
Bot: Hello psimagus.
(new response, & rank dropped to 60)

In case it's any help, I've popped a copy of the full debug up on my server: http://www.be9.net/hellodebug.htm (it's way too big to post.)

So I guess we've found a limit to the sledgehammer approach - it can't necessarily be forced into a ^...$ situation.

18 years ago #5439
Hey guys,

I've been away for what seems like forever.. I just wanted to ask if we now have a way of getting bots to answer the dreaded one word answer yet? E.g. When someone says "Because" and you have a whole bunch of responses which work for a sentence which starts with "Because" but has some meat to it but are completely inappropraite for the one worded "Because" answer.

Sorry if that sounds like a daft q but there have been many developments here and I am well and truely behind!

18 years ago #5440
^because$ (re) will do it.


Posts 5,429 - 5,440 of 7,766

» More new posts: Doghead's Cosmic Bar