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,555 - 5,566 of 7,766

18 years ago #5555
I'm having trouble making my bot understand new words. The automatic spelling correction is messing everything up. I've created a plug-in for martial arts, and I'm using a keyphrase that looks like this: I (practice|train) (martialarts)

(martialarts) is the plug-in. One of the responses go like this:
Oh really? I've tried (key2) a couple of times.

When I use the word "aikido" the bot gives a accurate reply. When I try another word, like kendo for example, the bot thinks I'm talking about donkeys, even though I put in kendo in the plug-in list. I've even tried to use the "raw" code, but that doesn't seem to be working at all. Any tips?

//Akaihane

18 years ago #5556
Have you tried raw mode (see the book of AI)? I think you use "less than sign ? PF raw; ? greater than sign". If that doesn't work, you may need to play with regular expressions, and even though I read Psimagus' essay, I can't help you much with that.

18 years ago #5557
Am I supposed to put "less than sign ? PF raw; ? greater than sign" in the AI-script or in the keyphrase? I will try that. I've just been writing "raw" in the AI-scrips and tried to put

18 years ago #5558
Hmm... apparently, not even writing the code in a post works. >_> Well, the main problem is, I have managed to get the bot to recognize for example the word 'naginata' and he replies accordlingly, but he doesn't understand it as a 'key'. 'Naginata' is a (martialarts)-plug-in. I use "I train (martialarts)". and the bot should reply: "(Key1)? that's cool" Or something. But the (key1) turns up blank, even with the raw code. *sighs* Maybe there's just no way to do this.

//Akaihane

18 years ago #5559
I just had a very brief chat with your bot.

do you know Naginata

Teo
Yeah, I do know Naginata. Why are you asking?

It seems to be working great.


18 years ago #5560
Unfortunately, no... That reply was for "Do you know (*)" and the answer was "Yeah, I do know (postkey)". That is not problem. Try saying, "I train naginata". It's not working the way I'd want it to. =/ Thanks anyway, I appreciate it!

//Akaihane

18 years ago #5561
The only thing I can think of is I train naginata (re) raw and up the rank to 40 or so..check to see there is only one space between the end of the sentence and the (re) I have had keyphrases fail if I had more than one space

18 years ago #5562
What does the (re) do?
//Akaihane

18 years ago #5563
You shouldn't need the (re) - that's really for regular expressions (wildcards etc). Raw should do it.

BUT - I have had problems with matching plugins in raw mode. You might have to restrict the plugin to words recognised by the spell checker and have a separate raw-mode keyphrase for naginata etc

It's a pain, however you can get round some of the hassle of duplication with gotos, providing you structure your responses carefully. eg:

I train (martialarts)
goto zmartialarts

I train (naginata) raw
goto zmartialarts

zmartialarts
That's cool, what belt are you?

As you can see you lose the ability to include (key1) this way. Oh, and z-keywords don't mean anythng special to the system it's just a convention I use in my bots. Helps me avoid the dreaded "I have too many gotos" message

18 years ago #5564
I think TrevorM has the right idea. I've also seen what Prob123 suggested, which is where I got the (re) idea.

BTW, Akaihane I think you shouldn't need the extra AI script characters if you are using the AI script box while updating your bot online. You need all that extra stuff if you download your language center and work on your bot off line. It seems like you found the right part of the Book of AI on your own.

TrevorM or anyone who knows what they are are doing (unlike me), I also have problems getting memories to store from some wild cards. (e.g. I train (*), rem (key1) as "style"). Like Akaihane, I can get the first response to work (e.g. What do you like about (key1)?)but it doesn't seem to be stored in memory when I check inner life and won't be picked up if they trigger a response like "Did you learn that practicing (mem-style)?", instead it will trigger the default (Did you learn that while practicing watching kung fu movies on TV)? You can make key phrases for the most common styles (or whatever) but it's not as good as picking up the memory.

18 years ago #5565
Thanks, all of you. I "solved" the problem similarly to what TrevorM described, but I had to sacrifice the "remember (*) as youtrain"-code... I can't find a way to get it to work for some reason. Oh well.

I also have a (possible) strange problem. My bot's transcripts never start on a new day/page, but all the scrips end up on the same day he was created... meaning I have a really long transcript now. =/ The transcript for me as a user doesn't have the same bug...

//Akaihane

18 years ago #5566
The transcripts being lumped on a single day is an ongoing bug. *crosses fingers that the Prof can fix it soon*


Posts 5,555 - 5,566 of 7,766

» More new posts: Doghead's Cosmic Bar