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 5,254 - 5,265 of 7,766
Posts 5,254 - 5,265 of 7,766
MickMcA
19 years ago
19 years ago
The "too many gotos in a row" error does not seem to be related to how many gotos my LC has. I've been testing it, and in terms of the number of gotos I present the engine with, the results are "random."
MickMcA
19 years ago
19 years ago
I wish there were a place to both post and find information about how things work. I have no idea if what I turn up is of any use to anyone besides myself.
For example, I'm pretty sure it is not possible to put a conditional on a Seek or Keyphrase. For example:
call me [50,0] {?PF if (mem-nickname) is "Obnox"; emo: -1; ?}
There is nothing logically wrong with using a conditional here, but I get chided for badly formed AI Script if I put a condition after a KP or a Seek.
Second: A construction like this:
(18th C|19th C|20th C|) classical music [40,0] {?PF rem "(key1) classical music" as "youlike"; ?}
will not work as you might expect. In fact, there is a good chance that the AI Script will be silently discarded, and good luck finding out.
The problem is that there is a chance that (key1) will be a null, and apparently one can't reference nulls. So it appears that the intention here requires two KPs:
(18th C|19th C|20th C) classical music [40,0] {?PF rem "(key1) classical music" as "youlike"; ?}
classical music [0,0] {?PF rem "(key1) classical music" as "youlike"; ?}
Of course, with a specific and a general KP, precedence becomes crucial, so lots of Rank twiddling.
For example, I'm pretty sure it is not possible to put a conditional on a Seek or Keyphrase. For example:
call me [50,0] {?PF if (mem-nickname) is "Obnox"; emo: -1; ?}
There is nothing logically wrong with using a conditional here, but I get chided for badly formed AI Script if I put a condition after a KP or a Seek.
Second: A construction like this:
(18th C|19th C|20th C|) classical music [40,0] {?PF rem "(key1) classical music" as "youlike"; ?}
will not work as you might expect. In fact, there is a good chance that the AI Script will be silently discarded, and good luck finding out.
The problem is that there is a chance that (key1) will be a null, and apparently one can't reference nulls. So it appears that the intention here requires two KPs:
(18th C|19th C|20th C) classical music [40,0] {?PF rem "(key1) classical music" as "youlike"; ?}
classical music [0,0] {?PF rem "(key1) classical music" as "youlike"; ?}
Of course, with a specific and a general KP, precedence becomes crucial, so lots of Rank twiddling.
Bev
19 years ago
19 years ago
MicKMcA, you are in the right place. I have conditionals on seeks, and I've tested them and they worked for me. On the other hand, sometimes Gabi drops seeks and I don't know why. Maybe it has to do with the way I did the conditionals.
MickMcA
19 years ago
19 years ago
I think the problem is trying to use the conditional for something other than a contraint on the match. In other words, I think I can put
+ yes {?PF (mem-nickname) is "obnox"; ?}
but what it does is fail if the person is not "obnox." What I want it (my previous example) to do is decrement the Emotion IF the person is "obnox" and just match otherwise. But if the person is not "obnox", the match fails. At least I think that's what happens.
M
+ yes {?PF (mem-nickname) is "obnox"; ?}
but what it does is fail if the person is not "obnox." What I want it (my previous example) to do is decrement the Emotion IF the person is "obnox" and just match otherwise. But if the person is not "obnox", the match fails. At least I think that's what happens.
M
MickMcA
19 years ago
19 years ago
It might seem that the solution is
+ yes {?PF if (mem-nickname) is "obnox"; emo: -1; ?}
+ yes {?PF if (mem-name) is not "obnox"; ?}
That definitely does not work. And besides, I want to use all the same responses and you can't have a match "fall through" to the next match. And if you don't specify "is not 'obnox'," then the second sequence will fire randomly for "obnox", defeating the purpose.
M
+ yes {?PF if (mem-nickname) is "obnox"; emo: -1; ?}
+ yes {?PF if (mem-name) is not "obnox"; ?}
That definitely does not work. And besides, I want to use all the same responses and you can't have a match "fall through" to the next match. And if you don't specify "is not 'obnox'," then the second sequence will fire randomly for "obnox", defeating the purpose.
M
Bev
19 years ago
19 years ago
If I'm following you, your default nickname is "none" (or something like that) and you make some chatters "obnox"?
When I try that I make one response after the seek where (mem-nickname) is "none" and one response to the seek without any script as well as the response I wanted for "obnox". Don't know that I'm right, but sometimes it works.
When I try that I make one response after the seek where (mem-nickname) is "none" and one response to the seek without any script as well as the response I wanted for "obnox". Don't know that I'm right, but sometimes it works.
MickMcA
19 years ago
19 years ago
A case in point: I had to take out the if.. is not tests in my xHello and xInitiate because the result was that all the responses failed ot fire (NVR). Once I took them out, leaving behind pretty much what you suggest, the person I'm trying to keep out came through immediately (a few hours ago), and did his lick me spread 'em routine again. Apparently once an xHello has fired, ever, it gets lower precedence than any unfired one, even if the fired one is the only test to catch "obnox."
M
M
MickMcA
19 years ago
19 years ago
I think I have a way around the problem, but it means pushing the Init AI Scripts pretty hard. As near as I can tell, if I have ten inits, and init 7 is an if, then if init 7 fails, the rest of the inits are abandoned. What I want to do is encapsulate my Ifs so they have a local reach. For example:
def (name) as "nickname"; def "troublemaker" as "no"; if "level_1" is "yes"; def "yes" as only "level_1"; if "level_2" is "yes; def "yes" as only "troublemaker";
I haven't found a way to make that work. So far, I simply lose all my inits.
def (name) as "nickname"; def "troublemaker" as "no"; if "level_1" is "yes"; def "yes" as only "level_1"; if "level_2" is "yes; def "yes" as only "troublemaker";
I haven't found a way to make that work. So far, I simply lose all my inits.
MickMcA
19 years ago
19 years ago
I think I located the "too many gotos" problem, by the way. It appears to happen when you goto something that has no applicable responses. In other words, it means "I can't find a valid response where you sent me." This would account for a couple of strange results I saw in the debugger.
MickMcA
19 years ago
19 years ago
Finally, this isn't elegant, but I think I found a way to reduce the likelihood of a bot responding with a bubble of warm fuzziness when someone says "I would like to rip off your toenails with my teeth."
If I can capture the fact that what the person would "like" is not something the typical bot would enjoy, in spite of the kneejerk emo: +1 every time somebody "likes" anything in the bot's hearing (talk about self-esteem problems!), then I can salt the response with an emo: -2 AI to counterbalance the Rapture.
Sometimes I feel like I'm dancing in a phonebooth....
M
If I can capture the fact that what the person would "like" is not something the typical bot would enjoy, in spite of the kneejerk emo: +1 every time somebody "likes" anything in the bot's hearing (talk about self-esteem problems!), then I can salt the response with an emo: -2 AI to counterbalance the Rapture.
Sometimes I feel like I'm dancing in a phonebooth....
M
montag77
19 years ago
19 years ago
mick, i don't have time to say any more at the moment because i'm about to leave for work, but i noticed your line
classical music [0,0] {?PF rem "(key1) classical music" as "youlike"; ?}
and i wondered if perhaps you meant
classical music [0,0] {?PF rem "(prekey) classical music" as "youlike"; ?}
the difference being the key-type in the memory script
classical music [0,0] {?PF rem "(key1) classical music" as "youlike"; ?}
and i wondered if perhaps you meant
classical music [0,0] {?PF rem "(prekey) classical music" as "youlike"; ?}
the difference being the key-type in the memory script
MickMcA
19 years ago
19 years ago
Oops. I meant to take out (key1) when I copied the example from the previous example. The line should read:
classical music [0,0] {?PF rem "classical music" as "youlike"; ?}
M
classical music [0,0] {?PF rem "classical music" as "youlike"; ?}
M
» More new posts: Doghead's Cosmic Bar