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,070 - 4,081 of 7,768

20 years ago #4070
One thing you could do is turn off your bot's memory settings (it's a good idea anyway, the default memories give pretty poor results IMHO), and then rely on the remember as only AI script for your memories. It'll replace a memory with a new one as you get it.

If you really want to rule out your bot using the memory more than once, another trick is to use a remember as only script in a keyphrase and then add a bunch of seeks where that memory would be used immediately. That way, the next time that any of those seek responses with that memory could be used, the memory would've already already been rewritten. I actually saved a post that Skysaw wrote a long, long time ago for my own reference, it's a good example:

-------------------------------------
Keyphrase: i (am|will be) your (adjartnoun)
AIScript: remember (key2) as only "last_sob"
Response: Cool. Does that mean I get to order you around and stuff?
Seek: yes
Seek Response: Good. My first order is go fetch me a better (mem-last_sob)!

Here is a sample run:
Me: I am your only friend.
Little Mu: Cool. Does that mean I get to order you around and stuff?
Me: Yes, go right ahead!
Little Mu: Good. My first order is go fetch me a better friend!

-------------------------------------

Now if the seek response was ever to be used again, the original keyphrase would need to hit first. Along comes a new memory, hopefully.

20 years ago #4071
Greylin,
You can easily reset memories by adding the appropriate command on the AIScript line at the beginning of your Language center, or in the AIScript Initialisation box of the Settings page of your bot.
This is part of the script I use to dress differently each time (in this case the plugin contains a list of different skirts):
AIScript: remember (skirt16832) as only "clothes1"; ...
Apparently you don’t even need a default statement

In your case you can add something like:
AIScript: remember "don’t know" as only "hat"; ...

On the other hand:
AIScript: default (name) as "name"; ...
Gives your bot a memory containing the name of the bot/person it's chatting with, which can be modified if the person/bot say something like "Just call me..."
A side effect of this is that you can identify the guests on the Inner Life page as you see their name as Guest123 instead of only an IP address, and compare memories of the Inner Life page with your transcripts.

20 years ago #4072
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.

20 years ago #4073
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 doesn’t 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 didn’t work as expected. The problem is that you can’t count on these x-keyphrases. Too many of chats don’t start with them. (xgoodbye, and xgottago aren’t 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 "don’t know" as "hat"; remember (mem-hat) as only "lasttime"; remember "don’t know" as only "hat"

This works perfectly as the script is parsed from left to right. I’m not sure the default is necessary, but I placed it there just to make sure the script isn’t 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.

20 years ago #4074
That's brilliant, Patricia!

20 years ago #4075
Thanks isaacc - Blush

20 years ago #4076
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?

20 years ago #4077
Greylin,
Yes the remember "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.

The remember "don’t 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 "don’t 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.

20 years ago #4078
Oh dear. GL's been talking like the Hulk to humans, even though bot holidays are turned off.

I think she stopped now.

20 years ago #4079
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

20 years ago #4080
I don't know if this will work but you could try:

Seek: (*)
AIscript: remember (key1) as "who"

20 years ago #4081
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.


Posts 4,070 - 4,081 of 7,768

» More new posts: Doghead's Cosmic Bar