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 3,555 - 3,566 of 7,766
Posts 3,555 - 3,566 of 7,766
Boner the Clown
20 years ago
20 years ago
I've got two xinitiates here that's giving me some problems. Pete has two automobile related responses for it:
Do you still drive that (mem-automake)? <?PF if (mem-automake) is not "unknown"; if (mem-automodel) is "unknown"; ?>
Do you still drive that (mem-automake) (mem-automodel)? <?PF if (mem-automake) is not "unknown"; if (mem-automodel) is not "unknown"; ?>
The first one is if he knows the make but not the model of the car, the second is if he knows both. Neither response should be used in any other case. I also have the following for default memories:
default "unknown" as "automake"; default "unknown" as "automodel";
The question is, why is Pete asking me "Do you still drive that ?" if he has no idea the make or model of my auto? What am I doing wrong here?
Do you still drive that (mem-automake)? <?PF if (mem-automake) is not "unknown"; if (mem-automodel) is "unknown"; ?>
Do you still drive that (mem-automake) (mem-automodel)? <?PF if (mem-automake) is not "unknown"; if (mem-automodel) is not "unknown"; ?>
The first one is if he knows the make but not the model of the car, the second is if he knows both. Neither response should be used in any other case. I also have the following for default memories:
default "unknown" as "automake"; default "unknown" as "automodel";
The question is, why is Pete asking me "Do you still drive that ?" if he has no idea the make or model of my auto? What am I doing wrong here?
doulos
20 years ago
20 years ago
Well I see a couple of things. First with the default memories it will always keep the memory "unknown" as one of the automake and automodel. So it should never ask, even if it worked right. Secondly on the first one you have if (mem-automodel) is "unknown"; ?>. You are missing is not.
Boner the Clown
20 years ago
20 years ago
According to the Book of AI, the default memory shouldn't reset if another memory is already in place:
INITIALIZE MEMORY
Where: Initialization
Statement: <?PF default "memorycontents" as "memoryname"; ?>
Example: <?PF default "bub" as "nickname"; ?>
What It Does: If memory does not exist, create it with this value
The "is not" is intentionally missing from the first response. Let's say that Pete knows you drive a Ford but doesn't know what model, that's where the first response should work. But let's say that he knows you drive a Ford Escort, the second response would come into play.
My best guess is that the engine is treating the AI script in the first response as an or statement rather than an and statement. I suppose I could just remove the "automodel" part altogether from the first response's AI script, but I don't want Pete to be saying the first response if he knows enough information to ask the more detailed one.
INITIALIZE MEMORY
Where: Initialization
Statement: <?PF default "memorycontents" as "memoryname"; ?>
Example: <?PF default "bub" as "nickname"; ?>
What It Does: If memory does not exist, create it with this value
The "is not" is intentionally missing from the first response. Let's say that Pete knows you drive a Ford but doesn't know what model, that's where the first response should work. But let's say that he knows you drive a Ford Escort, the second response would come into play.
My best guess is that the engine is treating the AI script in the first response as an or statement rather than an and statement. I suppose I could just remove the "automodel" part altogether from the first response's AI script, but I don't want Pete to be saying the first response if he knows enough information to ask the more detailed one.
doulos
20 years ago
20 years ago
Yes i realize it wont reset but it wont disappear either unless when writing the memory you use only. Yes I think removing it will solve you prob.
Shadyman
20 years ago
20 years ago
Boner: try this:
Instead of your default, just use an If "mem-car" exists; for your question
And when someone tells you what car they drive, remember "blah" as "car";
Instead of your default, just use an If "mem-car" exists; for your question
And when someone tells you what car they drive, remember "blah" as "car";
Boner the Clown
20 years ago
20 years ago
That would be too easy. 
Actually, I can think of a couple of minor benefits to doing it this way if I can get it to work:
1. I'll have those two lines available in Pete's Inner Life editor to add memories manually if I see them said in a context that the bot doesn't recognize.
2. If, for example, an "i (sold|totaled) it" seek for one of those xinitiates was triggered, the bot would have a means of resetting the memory back to an unknown status. I don't believe there's a way for bot to clear its own memories without replacing it with something else.
It's pretty minor stuff, but the main point is that I'm trying to learn AI script a little better. If I just removed the defaults altogether, I still have no idea what I'm doing wrong or if there's a bug.

Actually, I can think of a couple of minor benefits to doing it this way if I can get it to work:
1. I'll have those two lines available in Pete's Inner Life editor to add memories manually if I see them said in a context that the bot doesn't recognize.
2. If, for example, an "i (sold|totaled) it" seek for one of those xinitiates was triggered, the bot would have a means of resetting the memory back to an unknown status. I don't believe there's a way for bot to clear its own memories without replacing it with something else.
It's pretty minor stuff, but the main point is that I'm trying to learn AI script a little better. If I just removed the defaults altogether, I still have no idea what I'm doing wrong or if there's a bug.
Butterfly Dream
20 years ago
20 years ago
Woohoo! Just fixed a problem I had with (definition) for a LONG time! Maybe I'm not the only one who has had trouble dealing with this:
If you have keyphrases like 'what is', 'what is a,' 'what is the'....you may have noticed your bot answering 'Oh, I know you know what 'the' means!' Well.......apparently if you increase the rank of those keyphrases--a lot--that won't happen anymore.
If you have keyphrases like 'what is', 'what is a,' 'what is the'....you may have noticed your bot answering 'Oh, I know you know what 'the' means!' Well.......apparently if you increase the rank of those keyphrases--a lot--that won't happen anymore.
Shadyman
20 years ago
20 years ago
You mean the differences between them, right?
Like have "what is the meaning of *" a lot higher than "what is *"
Like have "what is the meaning of *" a lot higher than "what is *"
Butterfly Dream
20 years ago
20 years ago
Maybe that's it. *slaps self*
I had to boost 'what is a' so it was considerably higher (5) than 'what is' (1). Why was that so hard?
I had to boost 'what is a' so it was considerably higher (5) than 'what is' (1). Why was that so hard?
tgfcoder
20 years ago
20 years ago
BD, just use all in one keyphrase:
"What is a *,what is *,what is the definition of *,what is the definition of a *,what does * mean"
That's what I do anyway
"What is a *,what is *,what is the definition of *,what is the definition of a *,what does * mean"
That's what I do anyway
» More new posts: Doghead's Cosmic Bar