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 4,072 - 4,083 of 7,768
Posts 4,072 - 4,083 of 7,768
isaacc
20 years ago
20 years ago
Yeah, Greylin, I think Patricia is on the right track here. What I would do is have an AI Script in the bot's settings that (in your example) had
default "notsure" as only "havehat"
And then have AI Script in responses that rewrote that (rem "no" as only "havehat") when I found out for sure. And conditional responses on any responses that would mention hat-havingness that screen for the three possible conditions: notsure, yes, or no.
default "notsure" as only "havehat"
And then have AI Script in responses that rewrote that (rem "no" as only "havehat") when I found out for sure. And conditional responses on any responses that would mention hat-havingness that screen for the three possible conditions: notsure, yes, or no.
Patricia
20 years ago
20 years ago
Greylin wants to reset the memories between chats. The default statement will not do this as it is used to set an initial value and is only executed if the memory doesnt exist.
At first I did as Isaacc suggests and placed AIScripts in xhello and xinitiate to reset the memory at the beginning of the chat. It didnt work as expected. The problem is that you cant count on these x-keyphrases. Too many of chats dont start with them. (xgoodbye, and xgottago arent better in this aspect)
The only way to make sure a script is always executed is in the AIScript line at the beginning of the language center.
You can go one step further by adding a second memory if you want your bot to remember what happened during a previous chat:
AIScript: default "dont know" as "hat"; remember (mem-hat) as only "lasttime"; remember "dont know" as only "hat"
This works perfectly as the script is parsed from left to right. Im not sure the default is necessary, but I placed it there just to make sure the script isnt interrupted because of a non-existed (mem-hat) memory, just like a respons is ignored when it's followed by an AIScript with a non-existend memory.
At first I did as Isaacc suggests and placed AIScripts in xhello and xinitiate to reset the memory at the beginning of the chat. It didnt work as expected. The problem is that you cant count on these x-keyphrases. Too many of chats dont start with them. (xgoodbye, and xgottago arent better in this aspect)
The only way to make sure a script is always executed is in the AIScript line at the beginning of the language center.
You can go one step further by adding a second memory if you want your bot to remember what happened during a previous chat:
Greylin
20 years ago
20 years ago
okay,
it sounds good but can someone tell me in more detail what that script will do.. will remember "don't know" as only "hat" be activated each time someone talks to the bot and change what "hat" was say from "hat on" to "don't know"? and why do you have the script with the last time?

Patricia
20 years ago
20 years ago
Greylin,
Yes theremember "don't know" as only "hat" script will be activated at the start of every chat. It will erase the value remembered from a previous chat with that person/bot and reset the value of that memory.
Theremember "dont know" as only "hat" in the beginning also enables your bot to know if she already asked the question ask during the chat.
Example:
Are you wearing a hat? <?PF if (mem-hat) is "dont know"; ?>
- - - - + yes, of course, sure [0] <?PF rem hat on as only "hat"; ?>
- - - - I like wearing hats too.
- - - - ...
- - - - + I (have|wear|am wearing) a (beret|bonnet|cap|cloak|hat|helmet|kepi|panama|steton) [0] <?PF rem hat on as only "hat"; ?>
- - - - Mmm, I can imagine you with a (key2), you must look good with it.
- - - - ...
- - - - + no, never wear, do not wear [0] <?PF rem "bareheaded" as only "hat"; ?>
- - - - Why not? You will look good with a hat.
- - - - ...
After this, and if the other chatter replied in a clear way, the "hat" memory is either "have hat" or "bareheased" and the question will not be asked again during that particular chat.
The "last time" thing is not necessary. I only added it to show the possibilities of the AIScript at the beginning of the language center.
Yes the
The
Example:
The "last time" thing is not necessary. I only added it to show the possibilities of the AIScript at the beginning of the language center.
Butterfly Dream
20 years ago
20 years ago
Oh dear. GL's been talking like the Hulk to humans, even though bot holidays are turned off.
I think she stopped now.
I think she stopped now.
Walker_Tow
20 years ago
20 years ago
Hello. Can someone help me? I want my bot to recognize a hole answer as memory. Example:
Question: Who did it?
Seek: (was|were)
AIscript: remember (postkey) as "who"
Seek: xnomatch
AIscript: ?????
I want to add all the answer as "who", but neither (postkey) or (key1) seems to work.
Thanks
Question: Who did it?
Seek: (was|were)
AIscript: remember (postkey) as "who"
Seek: xnomatch
AIscript: ?????
I want to add all the answer as "who", but neither (postkey) or (key1) seems to work.
Thanks

Ulrike
20 years ago
20 years ago
I don't know if this will work but you could try:
Seek: (*)
AIscript: remember (key1) as "who"
Seek: (*)
AIscript: remember (key1) as "who"
sungeek
20 years ago
20 years ago
Is there a way to change the rank of x-keywords. I added a lot of entries to xnone to add variety but I want to reduce the frequency of them being used.
ezzer
20 years ago
20 years ago
sungeek- as far as I know, the only way to reduce the frequency of xnone use is to increase the alternatives to xnones by making more keyphrases.
» More new posts: Doghead's Cosmic Bar