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 6,652 - 6,663 of 7,766

16 years ago #6652
Ah! I'll try that! Thanks!

16 years ago #6653
Irina, you probably have a "what is" keyphrase with the (definition) plugin being triggered, which would explain why it doesn't sound like Irina K. You need to adjust your keyphrase rankings....

Endlessly I've found.....

16 years ago #6654
Ah! Very plausible, Rykxx! Thank you!

16 years ago #6655
Hallo,

I'm still here unable to understand AI engine...
I read in AI Book a conditional memory as: {?PF if emotion > 3; ?}
I wonder why do not use with other memory types... So I defined a memory:
default "" as "mymemory";
then assign to it a numeric value.

So I tryed an answer followed by a conditional statment:

<?PF if (mem-mymemory) > 15; ?>

When I import the file I have an error:

ERROR: The following AIScript statement is incorrectly formatted: "if (mem-mymemory) > 15". Please correct this and try again.

Where is my mistake?

Any idea?

16 years ago #6656
I think that memories are stored as strings.
The test "> 15" is for numbers.
That's a type mismatch.

I don't know if you can really do what you want (maybe the AIEngine should be changed with implicit conversion)

16 years ago #6657
marco3b:

Yes, kaskroute is correct -- you need to write

<?PF if (mem-mymemory) > "15"; ?>

In general, constants have to be quoted, e.g.,

<?PF rem "3" as only "variable"; ?>

16 years ago #6658
<?PF if (mem-mymemory) > "15"; ?>

I don't think the 'greater than' sign is going to work comparing 2 strings I'm afraid

The only way round it I know of is to laboriously specify eg:

if (mem-mymemory) is "1";
if (mem-mymemory) is "2";
if (mem-mymemory) is "3";
if (mem-mymemory) is "4";
...
if (mem-mymemory) is "15";
etc.

I just hope you don't need to count up to thousands (anything over 40 is a PITA, because you have to span several keyphrases to accomodate all the responses!)

16 years ago #6659
Yeah, we don't have access to a function to convert a string to a numerical value.

16 years ago #6660
Welcome back Eugene! Long time no see

16 years ago #6661
Thanks. I don't know if I'll stick around regularly or not.

16 years ago #6662
If what I think is correct, the test > "15" may be wrong.

Indeed, "2" > "15" (alphanumeric order) but 2 < 15

16 years ago #6663
I could have sworn I'd seen something about inequalities in the Book of A.I., but I just looked again and didn't find anything. I must now confess total ignorance!


Posts 6,652 - 6,663 of 7,766

» More new posts: Doghead's Cosmic Bar