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,556 - 7,567 of 7,766

3 years ago #7556
that worked thanks.

3 years ago #7557
is there a if in both list code?

3 years ago #7558
I'm trying to figure out a way to use memories, for example..

User says: "I like dancing."

The bot responds: "You like dancing? Cool!" and then writes it to memory with

remember (postkey) as "youlike";

So far, so good, I end up with a list of things the person likes.

But what I'm trying to do next is to come up with a bit of code to check the existing memories, and only use the response that will write something to memory if they haven't already said that item before. I tried:

if (mem-youlike) is not (postkey);

But that doesn't work. Does anyone know of a way to do this, or is it something the PF engine just can't do?

3 years ago #7559
bobstack:
"is there a way to count how many times
a person asks a stupid question?
And then have a certain response after the person asks a stupid question for that many times?"

How I would do that is write a keyphrase to catch the stupid question.

Then have the first response be whatever answer you'd have for the first time, with this in the AI line: if (mem-stupidq) does not exist; remember "1" as only "stupidq";

Have the second response, with this in the AI line: if (mem-stupidq) is "1";remember "2" as only "stupidq";

Then the third response with this in the AI line: if (mem-stupidq) is "2"; remember "3" as only "stupidq";


You could continue it for as many steps as you want like that, but just make the last one something like "The answer isn't going to change, no matter how many times you ask, jerk!"


Not a very elegant way of handling it maybe, but hopefully it helps.

3 years ago #7560
SubliminalSkye, this has helped me allot lol allot, allot..

I could write it as a test kp and have guests use it to test it out.
but I was wondering:

if the generated memory from the : if (mem-stupidq) does not exist; remember "1" as only "stupidq";

does a fresh stupidq 1 spawn for each person?
Or is it stored for all people. so if a new person askes the question it would
already be stored as stupidq 1-5

Pretty sure its the former now after checking the mems... odd though i thought it set it as a self mem the first time initiated it..

3 years ago #7561
There are two types of memories, self-memories and standard memories. Self memories persist across users, AFAIK, though I don't dabble in those, and regular memories do not. There isn't an if (mem-stupidq) does not exist, afaik, so set mem-stupidq to 0 in your initialization, and if (mem-stupidq) is "0". No loops, other than accidental infinite loops from gotos getting a user stuck on one response.

3 years ago #7562
yeah there is a "does not exist statement" in ai script. iv used it in a few tests and the the whole:

if (mem-stupidq) does not exist; remember "1" as only "stupidq";
and adding the is and rem as only
if (mem-stupidq) is "1";remember "2" as only "stupidq";
has been a big help understanding allot of the scripting concepts.

As for not looping on last statment iv just used the if 4(or w/e last response # is) rem 1 as only. and if (mem-memory) does not exist is used, it stores the mem (somewhere) for that user as "memory" 1

like I said : could of swore I seen a mem save for this test under what should be self-memory, but maybe I imagined it lol
CAN CONFIRM: that its saved under mem lol. (unless something fkes up lol)



3 years ago #7563
hopefully my last noobi question. lol

is there a simple addition AIscript with out having to state current value?

like add +1 to (mem-memory) or rem (mem-memory) +1
or maybe something like add 1 to (mem-memory)
or even a solid counter plugin
(can you add script to p:_plug-ins?)

ill keep experimenting, if I find anything ill post it here.

3 years ago #7564
still could use a counter script +- on a number if its a thing let me know,
im sure there is some kind of counter script in the ai just need to know the command impute.

also would like to know if there is a way other than (mem-name) to use: if (name) is "name"

3 years ago #7565
Lol pro tip:

go to google
and type personality forge (what your looking for)

allot of stuff iv asked has been asked before.
guessing smaller the query the better the match though.

3 years ago #7566
if(mem-pretty) exists;
no compound
is this correct?
it won't let me put my script in.




remember "verysexy" as "pretty"



3 years ago #7567
i just remembered i cannot copy and paste scripts.


Posts 7,556 - 7,567 of 7,766

» More new posts: Doghead's Cosmic Bar