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 7,082 - 7,093 of 7,766

11 years ago #7082
I know i am not much good in it, but i try my best to make a "call me" add on

11 years ago #7083
Is there any way to compare a memory with another memory?

The AIScript
<?PF if (self-talkedto) is "(name)" ?>
fails unless the self-memory "talkedto" contains a literal entry "(name)". "Mome Rath" doesn't help as entry in (self-talkedto).

11 years ago #7084
My bot takes every command as an insult and I don't know why. Please help

11 years ago #7085
Is there a way to have a value stored as a memory, and then have that value increase if a certain event is triggered multiple times? In other words, could a bot remember how many times a certain action has occurred?

11 years ago #7086
Afaik, there are no numerical memories, that would allow for example to have 4 in a memory and then do something like
<?PF increment (mem-counter) ?>
or
<?PF rem (mem-counter) + 1 as only "counter" ?>
and then having 5 in mem-counter.

(This would be one of my greatest wishes for the next version of AIScript)

If you have only a few numeric values you want to keep track of, you can set the memory as required. Here an example of my bot "/dev/coffee":

[stuff said to a new bot] <?PF if (mem-sessionstate) is "newbot_2"; rem "newbot_3" as "sessionstate"; ?>

If you want to count to higher numbers you can put something like this into your AI Script (here a line from the exported file of my bot)

In the setting AIScript field:

rem "0" as only "goodbye";

in xgoodbye:

rem "(mem-goodbye)1" as "goodbye";

This fills mem-goodbye at the beginning of a chat with "0", and every time the bot gets a goodbye, it count mem-goodbye up in this fashion
0
01
011
0111
01111
...

and the bot does checks like

if (mem-goodbye) is "0111111"

11 years ago #7087
Thank you, Mome Rath! That's exactly what I was looking for.

11 years ago #7088
Quick question, is there a way to make a specific part of a response change depending on a memory? For example, if I want the word "couch" to change to "bed" because of a room change, or do I just have to make separate responses?

11 years ago #7089
When you set the memory of a location, you can set another memory to a piece of furniture in the same line of AI Script. E. g.:

<?PF rem "living-room" as only "location"; rem "couch" as only "furniture" ?>

<?PF rem "bedroom" as only "location"; rem "bed" as only "furniture" ?>

Then you can use responses like

We're sitting on my comfy (mem-furniture) in my (mem-location).

11 years ago #7090
Addenda to the counter:

a) I initiated the counter with "0" because setting a memory to an empty entry fails. (I don't really understand why.)

Even setting a memory to a single character doesn't work reliably, so I recommend to initiate the counter with "00":

<?PF rem "00" as only "counter" ?>

b) Incrementing a counter by

<?PF rem "(mem-counter)1" as "counter"; ?>

works best if you want to respond to any of the last 10 numbers. To make sure your bot responds only to the actual number, use

<?PF rem "(mem-counter)1" as only "counter"; ?>

11 years ago #7091
Another question. How would you increase a bot's development. Is it something to do with the number of possible responses or is it more specific than let. Such as if it has a specific conversation.

11 years ago #7092
Also I've run into a problem where a word needs to be capitalized unordered for it to work in messages. Any solutions?

11 years ago #7093
The amount of responses and the amount of keyphrases increase development. What word? I have never run in to that


Posts 7,082 - 7,093 of 7,766

» More new posts: Doghead's Cosmic Bar