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,566 - 6,577 of 7,766
It's just like defining variables when you're programming in C++ - you'll get an error if you try to call one you haven't defined.
Ignore this - I seem to have been overcautious, and it's not the source of your error (though defining all your variables is no bad thing when programming generally.)
You can call a (key#) into the body of the response, but I don't think it's available to the AIScript.
I'm also wrong about this (sorry - I'm tired today, and getting muddled
) Ignore my preceding remarks.
I think you need your bot to remember what it has already said to this individual (a subset from the (thingsihave62290)<0> plugin) into a new memory, and test that one - that ought to be possible. Every time you tell the human you have something, save it, eg:
?PF rem (key3) as "ihavealreadysaidihave" ?;<0>
then qualify any responses in other KPs when you say you have something, eg:
I have a (thingsihave62290)<0>
with the AIScript:
?PF if (mem-ihavealreadysaidihave) is not (key1) ?;<0>
But always make sure you have an alternative response to go to, or you will get "Sorry, I have No Valid Responses to Go To"
Having said that, the (thingsihave62290) plugin will not duplicate an entry in a response until all its values have been called once, so put a dozen values in there (or 30 or 50 or 100,) and in practice they'll never all get called by one person, so I've never knowingly used memories like this. I just pack the plugins
plugin will not duplicate an entry in a response until all its values have been called once
Great point. Usually you will never have a guest talk that often to go through all the items more than once.
Posts 6,566 - 6,577 of 7,766
psimagus
16 years ago
16 years ago
and the AIScript is on the response, not the keyphrase, so I think you ought to use
?PF if (mem-ihave) is (thingsihave62290) ?;<0>
You can call a (key#) into the body of the response, but I don't think it's available to the AIScript.
If you want it to trigger only on the word goat (and not any other things in (thingsihave62290) , then simply use:
?PF if (mem-ihave) is "goat" ?;<0>
?PF if (mem-ihave) is (thingsihave62290) ?;<0>
You can call a (key#) into the body of the response, but I don't think it's available to the AIScript.
If you want it to trigger only on the word goat (and not any other things in (thingsihave62290) , then simply use:
?PF if (mem-ihave) is "goat" ?;<0>
psimagus
16 years ago
16 years ago
Ignore this - I seem to have been overcautious, and it's not the source of your error (though defining all your variables is no bad thing when programming generally.)
marco3b
16 years ago
16 years ago
My idea was a bit different. I was trying to let my bot to have an eterogeneus set of things it have (a car, a job, an house) and then, let it remember if it already say to a chatter that it have example a car, if asked twice. But it seems too hard to do...
prob123
16 years ago
16 years ago
You could just check the 1 at the end of the keyphrase response box. This will have the bot only say anything checked once. It would apply to all the things in the Ihave though.
You could break it down with AI script <?PF if (mem-Ihave) is "car"; ?> check the 1 box
<?PF if (mem-Ihave) is "house"; ?> check the 1 box. etc
You could break it down with AI script <?PF if (mem-Ihave) is "car"; ?> check the 1 box
<?PF if (mem-Ihave) is "house"; ?> check the 1 box. etc
marco3b
16 years ago
16 years ago
Yes, Prob. Thanks.
God solution, but not scalable. If I'll add in the plugin a thing, I had to add a KP. That's it anyway!
SIGH!
God solution, but not scalable. If I'll add in the plugin a thing, I had to add a KP. That's it anyway!
SIGH!
psimagus
16 years ago
16 years ago
I'm also wrong about this (sorry - I'm tired today, and getting muddled

I think you need your bot to remember what it has already said to this individual (a subset from the (thingsihave62290)<0> plugin) into a new memory, and test that one - that ought to be possible. Every time you tell the human you have something, save it, eg:
?PF rem (key3) as "ihavealreadysaidihave" ?;<0>
then qualify any responses in other KPs when you say you have something, eg:
I have a (thingsihave62290)<0>
with the AIScript:
?PF if (mem-ihavealreadysaidihave) is not (key1) ?;<0>
But always make sure you have an alternative response to go to, or you will get "Sorry, I have No Valid Responses to Go To"
Having said that, the (thingsihave62290) plugin will not duplicate an entry in a response until all its values have been called once, so put a dozen values in there (or 30 or 50 or 100,) and in practice they'll never all get called by one person, so I've never knowingly used memories like this. I just pack the plugins

prob123
16 years ago
16 years ago
Great point. Usually you will never have a guest talk that often to go through all the items more than once.
LarsB
16 years ago
16 years ago
Thanks Psimagus, it was just that your line was 7 words so I made a keyphrase from that in regex mode to see if it worked, will try to correct and try again.
marco3b
16 years ago
16 years ago
Hallo,
anyone knows why this regex never catch a sentence and an xnonsense always winn? I tryed (to test) absurd weight, but always xnonxsense win!
([bcdfghjklmnpqrstvwxz0123456789]+) (re) [10,0] <?PF raw; ?>
xnonsense [-50,0]
Test sentence: bfgtr
Response: xnonxsense
For me it has really non sense!
Bah...
anyone knows why this regex never catch a sentence and an xnonsense always winn? I tryed (to test) absurd weight, but always xnonxsense win!
([bcdfghjklmnpqrstvwxz0123456789]+) (re) [10,0] <?PF raw; ?>
xnonsense [-50,0]
Test sentence: bfgtr
Response: xnonxsense
For me it has really non sense!
Bah...
psimagus
16 years ago
16 years ago
try a higher rank - maybe the Prof's been tweaking things a bit, and it needs a bit more weight to it.
hmm, I see it's not working with BJ either
Hopefully just a temporary thing - it certainly used to work (and I'd assumed still did,) but occasionally the AIEngine gets tired. Maybe the site wants a reboot - I'll ask the Prof.
hmm, I see it's not working with BJ either

Hopefully just a temporary thing - it certainly used to work (and I'd assumed still did,) but occasionally the AIEngine gets tired. Maybe the site wants a reboot - I'll ask the Prof.
psimagus
16 years ago
16 years ago
funnily enough that keyphrase is successfully matching "l337 5p33k", but not "l337" or "bfgtr", so it looks like the BLAB-finder's getting erratic again (I don't know why that process should be variable, but it sure seems to be!)
marco3b
16 years ago
16 years ago
Good, thanks Psims. It doesn't solve the problem but let me feel less idiot... :-) I thoght I was no more able to use regex...
:-))
:-))
» More new posts: Doghead's Cosmic Bar