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,351 - 5,362 of 7,766

19 years ago #5351
The bot-bots are still hosted on your browser.

I imagine it's not happening to transcripts that occur while you're not logged in?

19 years ago #5352
An example:

Ulrike: *eats some chocolate*
Sonora: Careful. That stuff clogs the arteries.

The KP is eats (*), and it picks up just fine, with or without *'s around it.

19 years ago #5353
I imagine it's not happening to transcripts that occur while you're not logged in?


.
I'm not positive. I think it still is

19 years ago #5354
To capture actions within asterisks, like *picks nose*, I use: \*(.+)\* (re) in raw mode. In case that doesn't show up right, that's back slash, asterisk, open parenthesis, period, plus, close parenthesis, back slash, asterisk. (key1) will pick up anything between the asterisks, but not consistently -- sometimes it's empty.

19 years ago #5355
Do you need to use regex? Because doing so loses a lot of the power of the processing. Raw mode leaves me with most of what I need though.

19 years ago #5356
I imagine it's not happening to transcripts that occur while you're not logged in?

I'm not positive. I think it still is

It is happening with ones which I am not seeing 'bots chatting' boxes for. Doesn't seem to happen when I'm not logged in though.

19 years ago #5357
Do you need to use regex? You don't NEED regex, it's handy and necessary to pick up a few keyphrases. You can do a lot without it, especially when you are just starting out, keep it simple at first

19 years ago #5358
Regex is required (I believe) to pick up ALL action phrases between asterisks without doing some serious "(verb)s" kind of stuff with plugins of exceptions since the asterisk has a special meaning for the AI engine. The above posted regex keyphrase works really well for me.

19 years ago #5359
Thanks then. I guess I'll need to recraft things using it. Sorry for being such a pest.

19 years ago #5360
Ok, after a few hours in the debugger, I'm confident that the following is true about AI Scripts:

In AI Init, def and rem are NOT interchangeable. You must use rem if you want to use "as only"; if you use "only" with def, the memory is discarded.

Running together with semi-colon space works fine.

Memory names can be mixed case. I'm not sure if they are strictly case-sensitive. I tend to use lc firstword, cap each succeeding with no word limiters, like this: inGarden, saidTea, and they are now (crossFingers) working fine.

As I reported/discovered a few weeks ago, you cannot if.. is not to match a condition where the memory name does not exist. You must create a dummy to run an is/is not on it.

And finally, also old news, memories created in KP AI are not fired until the next step is complete. In other words, if you load mem-tmpwd in a KP, it will NOT be available for the Response!

And finally, finally, if you want to compare a key in AI, you must first assign it to a variable, like this:

rem (key1) as "tmpwd"; if (mem-tmpwd) is "jazz";

Certain problems can be intractable. I wanted to set
rem "0" as only "youRate";
and it flat out would not initialize. I decided that it was translating the number as a Null, and tried "A" but that didn't work. Finally I tried "none", planning to use "good," "bad", etc. THAT didn't work. I gave up on it. It was as if "youRate" were a reserved word.

With the def/rem distinction in the AI Inits, I can rebuild my xNones the way they were before. Yeaaa!

19 years ago #5361
To add to that, def only constructs a memory if one does not exist already. In other words, it won't overwrite an existing memory. This is especially handy if you want your bot to ask a question only if it doesn't already have an answer. Example:

def "unknown" as "yourAge";

KP: it is my birthday
reply 1:How old are you? <?PF if "yourAge" is "unknown"; ?>
seek: (numbers100)
seek reply: You're old! <?PF rem "(key1)" as only "yourAge"; ?>
reply 2: Goodbye to year (mem-yourAge) of your life, huh? <?PF if "yourAge" is not "unknown"; ?>

"How old are you?" won't get asked again if the person responds with a number the first time.

19 years ago #5362
It's long overdue, but I've finally updated BJ's keynome (currently 9004 keyphrases). And, many thanks are due to Boner the Clown, who has released Pete Puma's keynome (months ago actually - sorry, I've only just got round to updating the webpage!)
Check both of them out @ http://www.be9.net/BJ/


Posts 5,351 - 5,362 of 7,766

» More new posts: Doghead's Cosmic Bar