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,676 - 6,687 of 7,766
No. You may however use the "*" in the keyphrase, and refer to it in the response. For example:
K: I am (adj) * (adv) [0,0]
R: (key2)?
Here whatever matches the "*" (possibly a blank) will become the content of (key2), because the "*" is the second nonspecific expression.
Not always. If the input is "I am green really", then (key1) = "green" and (key2) = "really"
If the input is "I am green cheese really", then (key1) = "green", (key2) = "cheese" and (key3) = "really"
Soft wildcards are always a bad idea if you want reliable access to subsequent (keys). It would be better to make 2 separate keyphrases:
I am (adj) (adv) [0,0]
I am (adj) (*) (adv) [0,0]
That way the keys are fixed, and can be safely referenced (2 in the first, 3 in the second.)
Not always. If the input is "I am green really", then (key1) = "green" and (key2) = "really"
I just tested the keyphrase
"I am (adj) * (adv)"
with response
"1: (key1) 2: (key2) 3: (key3)".
When I gave it
"I am green really", I got back
"1: green 2: 3: really".
Thus (key2) got the blank, not "really".
That is, what the "*" matched became (key2), as I said before.
Guest : Oh, Irina, I consider myself blessed!
Irina Khalidar: Do you have no doubt that you consider yourself infernal, Guest?
Does WordNet think that "infernal" is a synonym of "blessed"?
Posts 6,676 - 6,687 of 7,766
psimagus
16 years ago
16 years ago
There are two problems with your example:
you are trying to specify a memory name incorporating a key ((key1)punch) - I don't think this is allowed (though never having tried it, I cannot entirely rule it out.) That is admittedly a drawback, and one PF3 will (hopefully) be addressing when it's implemented, but ATM you have to explicitly define each memory.
Secondly (and much more importantly) you cannot pass a wildcard (* ) into a memory in this manner - you need to pass the appropriate key instead. Not knowing the exact keyphrase this AIScript is attached to, I cannot tell which (key_) you want, but assuming there is only a single wildcard (and no local plugins,) you should use:
{?PF remember (key1) as "rabbitpunch"; ?}
and then specify separate memories for all other classes of punch that may be encountered (jab, cross, hook, uppercut, roundhouse, etc.)
That is quite inefficient, I grant you, but it's currently the best we can do
. See recent discussions in Seasons for some suggestions how automatic memory specification might be implemented.
you are trying to specify a memory name incorporating a key (
Secondly (and much more importantly) you cannot pass a wildcard (
{?PF remember (key1) as "rabbitpunch"; ?}
and then specify separate memories for all other classes of punch that may be encountered (jab, cross, hook, uppercut, roundhouse, etc.)
That is quite inefficient, I grant you, but it's currently the best we can do

psimagus
16 years ago
16 years ago
K: I am (adj) * (adv) [0,0]
R: (key2)?
Here whatever matches the "*" (possibly a blank) will become the content of (key2), because the "*" is the second nonspecific expression.
Not always. If the input is "I am green really", then (key1) = "green" and (key2) = "really"
If the input is "I am green cheese really", then (key1) = "green", (key2) = "cheese" and (key3) = "really"
Soft wildcards are always a bad idea if you want reliable access to subsequent (keys). It would be better to make 2 separate keyphrases:
I am (adj) (adv) [0,0]
I am (adj) (*) (adv) [0,0]
That way the keys are fixed, and can be safely referenced (2 in the first, 3 in the second.)
Irina
16 years ago
16 years ago
I just tested the keyphrase
"I am (adj) * (adv)"
with response
"1: (key1) 2: (key2) 3: (key3)".
When I gave it
"I am green really", I got back
"1: green 2: 3: really".
Thus (key2) got the blank, not "really".
That is, what the "*" matched became (key2), as I said before.
prob123
16 years ago
16 years ago
Yes, the soft wild card can be "something" or "nothing". If it is nothing the (key2) just doesn't record anything. I love the soft wild card.
psimagus
16 years ago
16 years ago
Good heavens - has it always worked that way? I've always used hard wildcards in such cases, so maybe I've been working around an imaginary problem all these years 

prob123
16 years ago
16 years ago
Yes, once the soft wild card is there it is always assigned a key, the key may remain blank but it is always the same key.
Irina
16 years ago
16 years ago
Guest : Oh, Irina, I consider myself blessed!
Irina Khalidar: Do you have no doubt that you consider yourself infernal, Guest?
kaskroute
16 years ago
16 years ago
What is THAT in my transcripts : :o:o:o
Answer Bot: (to kojak) *She moves down to his crotch and begins to gently suck his dick like it was a lollypop.*
I never had written that in my language center !
Answer Bot: (to kojak) *She moves down to his crotch and begins to gently suck his dick like it was a lollypop.*
I never had written that in my language center !
Bev
16 years ago
16 years ago
Kaskroute, that's the channeling bug where the bots get switched sometimes. We are hoping the prof will have time to fix that someday.

marco3b
16 years ago
16 years ago
Hi, I'm back for who was wondering where I was...
Irina, Prob123, Psim, I'm a bit astonished. You said that soft wildcard are always assigned to a Key? I performed a lot of tests, and always had a different response. If the soft wildcard was assigned, it is in the key list, if not, it was never considered and the key list shift to the left...
I rewrote quite all my bot to avoid this problem!
Why for you it works as fix, and for me no?
There is something that I don't realize.
Hi PROFESSOR, should you explain us how it should work?
Thanks!
Irina, Prob123, Psim, I'm a bit astonished. You said that soft wildcard are always assigned to a Key? I performed a lot of tests, and always had a different response. If the soft wildcard was assigned, it is in the key list, if not, it was never considered and the key list shift to the left...
I rewrote quite all my bot to avoid this problem!
Why for you it works as fix, and for me no?
There is something that I don't realize.
Hi PROFESSOR, should you explain us how it should work?
Thanks!
prob123
16 years ago
16 years ago
Look at my keyphrase. It has a hard and a soft wild card. The soft is always (key1) and the hard is always (key2).
did not you * read (*)
You: didn't you even read the note
Bot: Do you have a copy of the note, I will return it tomorrow.
notice that in one the soft wild card is used It is( key1). the response is
do you have a copy of (key2), I will return it tomorrow.
You: didn't you read the memo
Bot: Sure I read the memorandum,.....honest.
Here (key1) is not used but the memo is still (key2)
Sure I read (key2),..............honest.
did not you * read (*)
You: didn't you even read the note
Bot: Do you have a copy of the note, I will return it tomorrow.
notice that in one the soft wild card is used It is( key1). the response is
do you have a copy of (key2), I will return it tomorrow.
You: didn't you read the memo
Bot: Sure I read the memorandum,.....honest.
Here (key1) is not used but the memo is still (key2)
Sure I read (key2),..............honest.
» More new posts: Doghead's Cosmic Bar