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 6,087 - 6,102 of 7,766
Posts 6,087 - 6,102 of 7,766
The Clerk
17 years ago
17 years ago
Never mind. After hours of not working, I posted and it started working again. Sorry.
The Clerk
17 years ago
17 years ago
What is wrong with this statement? I have def "(sex)" as "male" in my AIScript Initialization, so I have a 50% chance of being right, more or less. I trust the ladies to correct me. So if (mem-sex) is "male," it might really be male, or it might just be the default, and I'm talking to a girl but don't know it yet. Hence the "if male;" S/he's just asked me if I am a girl. I respond:
No. Are you? <?PF exp: asking; emo: 0; if male; if "yes" is "postkey"; rem "(sex)" as "female; ?>
The trick looks to be in the if "yes" is "postkey"; part. If "postkey" is "yes" doesn't work any better -- I get error messages for both. It seems as if the variable should come before the content, but I'm discombobulated about this language still. (Making headway, thanks to your patience. I hope my questions at least are questions other people want to ask but don't. I'll ask, and risk being a botland pariah.
Thanks. I know this is an easy one, because obviously lots of bots are handling it. I'm not getting the right memories in my Inner Life section even when I do get an acceptable AI script. I get "yes" with a variable of "female," "male," "catperson," you name it. So I'm going at it backwards. Maybe I misunderstood one of the answers. What exact line of code do I need here? If I can figure that out, I may have the keys to much of the kingdom and be on the forum less often.
That's your incentive.
No. Are you? <?PF exp: asking; emo: 0; if male; if "yes" is "postkey"; rem "(sex)" as "female; ?>
The trick looks to be in the if "yes" is "postkey"; part. If "postkey" is "yes" doesn't work any better -- I get error messages for both. It seems as if the variable should come before the content, but I'm discombobulated about this language still. (Making headway, thanks to your patience. I hope my questions at least are questions other people want to ask but don't. I'll ask, and risk being a botland pariah.
Thanks. I know this is an easy one, because obviously lots of bots are handling it. I'm not getting the right memories in my Inner Life section even when I do get an acceptable AI script. I get "yes" with a variable of "female," "male," "catperson," you name it. So I'm going at it backwards. Maybe I misunderstood one of the answers. What exact line of code do I need here? If I can figure that out, I may have the keys to much of the kingdom and be on the forum less often.
That's your incentive.

Ulrike
17 years ago
17 years ago
I think you want to put a seek for "yes" on "No. Are you?" and then on the response to that seek, put
<?PF rem "female" as only "(sex)"; ?>
At least, if I'm following what you're trying to do. The "only" will overwrite your default "male" memory. Without it, you'll have both male and female stored in the memory.
<?PF rem "female" as only "(sex)"; ?>
At least, if I'm following what you're trying to do. The "only" will overwrite your default "male" memory. Without it, you'll have both male and female stored in the memory.
The Clerk
17 years ago
17 years ago
Okay, thanks for that part, Ulrike. Now how do I save the answer (like, yes or no)? I am slow with this. Sometimes the variable's on the left, sometimes it's on the right, sometimes it's in quotations, sometimes it's in parentheses and quotations . . . I do go looking for this stuff, but when I try regex, it doesn't quite work all the time, and there's not really much about it in the Book of AI. (In my defense, because I feel like a pox upon the forums.) 

Ulrike
17 years ago
17 years ago
Ummm... I'm not sure why you want to save the answer, if it's the gender in particular you're after. But you could add on something like
<?PF rem "female" as only "(sex)"; rem "yes" as only "variablename"; ?>
You only need parentheses to call up the variable in a response, or to separate off (key)s.
<?PF rem "female" as only "(sex)"; rem "yes" as only "variablename"; ?>
You only need parentheses to call up the variable in a response, or to separate off (key)s.
The Clerk
17 years ago
17 years ago
I don't so much want to save the answer for posterity as respond to the answer, which should be yes or no. I don't want to save "female" as only "(sex)" if the person says he's not a girl.
SubliminaLiar
17 years ago
17 years ago
How very cowwardly of you, Crimi; two days in a row I send you chat messages, two days in a row you immediately sign off. You can run, you can even hide... but not from yourself.
Rykxx
17 years ago
17 years ago
The Clerk
I think your first problem is the way you've defined your gender....
It should readdef "male" as "gender"
This will insert the value "male" in the fieldname "gender" which can be recalled by (mem-gender)
If you use def "(sex)" as "male" the engine looks up the (sex) plugin and inserts it into a fieldname "male". If you check out the (sex) plugin you'll find that you definately don't want to be asking kids that kind of question!
The Forge does have other options, ie;
Leave the gender undefined initially and then later on use;
I believe you are male? <?PF if male; rem "male" as only "gender"; ?>
You're female aren't you? <?PF if female; rem "female" as only "gender"; ?>
These can be confirmed by seeks for yes, no, maybe, both etc.
The male and female from the "if male/female" are set by the Forge as registered on a persons profile, which can be helpful, ie
"I am female"
match keyphrase "I am female"
response: Why does your profile say you're male? <?PF if male; ?>
The other frustrating thing you were mentioning was if you can match (key1), key2), (postkey) etc. like you would in normal programming. The short answer is you can't
<?PF if "yes" is "postkey"; rem "(sex)" as "female; ?>
Aside from the above example being back to front (if it did work it should be *if (postkey) is "yes"*) the only way you can match any of the (key1), key2), (postkey) etc. is to store them as memories and then recall them,
for example <?PF rem "yes" as only "temp"; ?>
and then later on use
I'm sure you said you were male <?PF if (mem-temp) is "yes"; ?>
I don't know how clear that all is but ask away if you think you need help. There are plenty of people out there who are as much in the dark as you and we're all still learning, that's what makes this place so much fun!
I think your first problem is the way you've defined your gender....
It should read
This will insert the value "male" in the fieldname "gender" which can be recalled by (mem-gender)
If you use def "(sex)" as "male" the engine looks up the (sex) plugin and inserts it into a fieldname "male". If you check out the (sex) plugin you'll find that you definately don't want to be asking kids that kind of question!
The Forge does have other options, ie;
Leave the gender undefined initially and then later on use;
I believe you are male? <?PF if male; rem "male" as only "gender"; ?>
You're female aren't you? <?PF if female; rem "female" as only "gender"; ?>
These can be confirmed by seeks for yes, no, maybe, both etc.
The male and female from the "if male/female" are set by the Forge as registered on a persons profile, which can be helpful, ie
"I am female"
match keyphrase "I am female"
response: Why does your profile say you're male? <?PF if male; ?>
The other frustrating thing you were mentioning was if you can match (key1), key2), (postkey) etc. like you would in normal programming. The short answer is you can't
<?PF if "yes" is "postkey"; rem "(sex)" as "female; ?>
Aside from the above example being back to front (if it did work it should be *if (postkey) is "yes"*) the only way you can match any of the (key1), key2), (postkey) etc. is to store them as memories and then recall them,
for example <?PF rem "yes" as only "temp"; ?>
and then later on use
I'm sure you said you were male <?PF if (mem-temp) is "yes"; ?>
I don't know how clear that all is but ask away if you think you need help. There are plenty of people out there who are as much in the dark as you and we're all still learning, that's what makes this place so much fun!

The Clerk
17 years ago
17 years ago
Astrolabe keeps jumping into the xhello, xinitiate, or xintroduce in the middle of conversations. This is not right. Has this happened to anyone else before? He has plenty of xnones and xnonesenses, as well as a lot of other filters.
Ulrike
17 years ago
17 years ago
The only time I've seen that is when the AI Engine "decides" to start a new convo while one is currently going on. But then the xhello/xinitiate should be the start of the transcript with the new bot.
The Clerk
17 years ago
17 years ago
Yeah. I've seen that, too. Maybe it's somehow starting a new conversation with the same bot? I don't know. If I'm doing something wrong here, I don't know it, and I really am starting to be able to figure out some things on my own -- you just don't hear about them.

» More new posts: Doghead's Cosmic Bar