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

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

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

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

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

20 years ago #3559
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";

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

20 years ago #3561
*shrug* If you want

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

20 years ago #3563
You mean the differences between them, right?
Like have "what is the meaning of *" a lot higher than "what is *"

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

20 years ago #3565
dunno.

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


Posts 3,555 - 3,566 of 7,766

» More new posts: Doghead's Cosmic Bar