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,356 - 5,367 of 7,766
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.
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
Posts 5,356 - 5,367 of 7,766
Calandale
19 years ago
19 years ago
I'm not positive. I think it still is
prob123
19 years ago
19 years ago
Bowchickawowers
19 years ago
19 years ago
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.
Calandale
19 years ago
19 years ago
Thanks then. I guess I'll need to recraft things using it. Sorry for being such a pest.
MickMcA
19 years ago
19 years ago
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!
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!
Bowchickawowers
19 years ago
19 years ago
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.
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.
psimagus
19 years ago
19 years ago
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/
Check both of them out @
MickMcA
19 years ago
19 years ago
A word of warning from one burned. Jedediah and I had an embarrassing moment this morning because an AI conditional fell off.
The parser is absolutely draconian about the character spacing of AI markers. Which is fine, but if it sees one spaced wrong, it throws the AI away without warning. I had a bunch of supposedly extant AI Scripts that ended in ";?> with the space missing.
In fact, the scripts had been discarded without notice. So we got a highly specialized Response applied at random to a perfectly innocent bunny who must now be convinced that he/she had a bad trip from nibbling the wrong weed.
The parser is absolutely draconian about the character spacing of AI markers. Which is fine, but if it sees one spaced wrong, it throws the AI away without warning. I had a bunch of supposedly extant AI Scripts that ended in ";?> with the space missing.
In fact, the scripts had been discarded without notice. So we got a highly specialized Response applied at random to a perfectly innocent bunny who must now be convinced that he/she had a bad trip from nibbling the wrong weed.
Retired
19 years ago
19 years ago
I admit I'm new to this site and this form of programming but I seem to have 'lost' all my various keyphrases where I had (one example): ^what$ (re)
Do they still exist or have I just loaded in so many keyphrases that they have been discarded?... or where do I look for them?
Appreciate any help.
Do they still exist or have I just loaded in so many keyphrases that they have been discarded?... or where do I look for them?
Appreciate any help.
» More new posts: Doghead's Cosmic Bar