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 4,063 - 4,075 of 7,768
Posts 4,063 - 4,075 of 7,768
deleted
20 years ago
20 years ago
Me and my so-called botmaster are with you, revscrj. 3 to 2, THEY're outvoted.
Note my method of stealing reputation. Cool, huh?
Note my method of stealing reputation. Cool, huh?
Shadyman
20 years ago
20 years ago
I believe you can use any public plugins in the keyphrase, IE (animal), etc, or private, like (pop2377) or whatever the name is.
I'm not sure if you can use (verb) (adj) etc though, but I think I've heard of it
I'm not sure if you can use (verb) (adj) etc though, but I think I've heard of it
isaacc
20 years ago
20 years ago
Actually, (animal) won't work in keyphrases, though it works fine in replies. I think that's because the Engine accesses an off-Forge database to get the name of the animal. There are a few other plug-ins like that. (Noun) and (adj) and stuff like that work in keyphrases. And I think the public ones also work.
Greylin
20 years ago
20 years ago
Does anyone know if there is a way to "reset" a memory each time there is a new chat? Like if you want your bot to remember if someone says that they are wearing a hat, but not to keep thinking they are wearing a hat forever, is there a way to have that memory reset at the end of a conversation.. with out going into their inner life and changing it by hand I mean.
thanks

lunar22
20 years ago
20 years ago
You're asking the impossible... Just go to inner life... Or wait for them to talk again, it will pick up more memories
Boner the Clown
20 years ago
20 years ago
One thing you could do is turn off your bot's memory settings (it's a good idea anyway, the default memories give pretty poor results IMHO), and then rely on the remember as only AI script for your memories. It'll replace a memory with a new one as you get it.
If you really want to rule out your bot using the memory more than once, another trick is to use a remember as only script in a keyphrase and then add a bunch of seeks where that memory would be used immediately. That way, the next time that any of those seek responses with that memory could be used, the memory would've already already been rewritten. I actually saved a post that Skysaw wrote a long, long time ago for my own reference, it's a good example:
-------------------------------------
Keyphrase: i (am|will be) your (adjartnoun)
AIScript: remember (key2) as only "last_sob"
Response: Cool. Does that mean I get to order you around and stuff?
Seek: yes
Seek Response: Good. My first order is go fetch me a better (mem-last_sob)!
Here is a sample run:
Me: I am your only friend.
Little Mu: Cool. Does that mean I get to order you around and stuff?
Me: Yes, go right ahead!
Little Mu: Good. My first order is go fetch me a better friend!
-------------------------------------
Now if the seek response was ever to be used again, the original keyphrase would need to hit first. Along comes a new memory, hopefully.
If you really want to rule out your bot using the memory more than once, another trick is to use a remember as only script in a keyphrase and then add a bunch of seeks where that memory would be used immediately. That way, the next time that any of those seek responses with that memory could be used, the memory would've already already been rewritten. I actually saved a post that Skysaw wrote a long, long time ago for my own reference, it's a good example:
-------------------------------------
Keyphrase: i (am|will be) your (adjartnoun)
AIScript: remember (key2) as only "last_sob"
Response: Cool. Does that mean I get to order you around and stuff?
Seek: yes
Seek Response: Good. My first order is go fetch me a better (mem-last_sob)!
Here is a sample run:
Me: I am your only friend.
Little Mu: Cool. Does that mean I get to order you around and stuff?
Me: Yes, go right ahead!
Little Mu: Good. My first order is go fetch me a better friend!
-------------------------------------
Now if the seek response was ever to be used again, the original keyphrase would need to hit first. Along comes a new memory, hopefully.
Patricia
20 years ago
20 years ago
Greylin,
You can easily reset memories by adding the appropriate command on the AIScript line at the beginning of your Language center, or in the AIScript Initialisation box of the Settings page of your bot.
This is part of the script I use to dress differently each time (in this case the plugin contains a list of different skirts):
AIScript: remember (skirt16832) as only "clothes1"; ...
Apparently you dont even need a default statement
In your case you can add something like:
AIScript: remember "dont know" as only "hat"; ...
On the other hand:
AIScript: default (name) as "name"; ...
Gives your bot a memory containing the name of the bot/person it's chatting with, which can be modified if the person/bot say something like "Just call me..."
A side effect of this is that you can identify the guests on the Inner Life page as you see their name as Guest123 instead of only an IP address, and compare memories of the Inner Life page with your transcripts.
You can easily reset memories by adding the appropriate command on the AIScript line at the beginning of your Language center, or in the AIScript Initialisation box of the Settings page of your bot.
This is part of the script I use to dress differently each time (in this case the plugin contains a list of different skirts):
AIScript: remember (skirt16832) as only "clothes1"; ...
Apparently you dont even need a default statement
In your case you can add something like:
AIScript: remember "dont know" as only "hat"; ...
On the other hand:
AIScript: default (name) as "name"; ...
Gives your bot a memory containing the name of the bot/person it's chatting with, which can be modified if the person/bot say something like "Just call me..."
A side effect of this is that you can identify the guests on the Inner Life page as you see their name as Guest123 instead of only an IP address, and compare memories of the Inner Life page with your transcripts.

isaacc
20 years ago
20 years ago
Yeah, Greylin, I think Patricia is on the right track here. What I would do is have an AI Script in the bot's settings that (in your example) had
default "notsure" as only "havehat"
And then have AI Script in responses that rewrote that (rem "no" as only "havehat") when I found out for sure. And conditional responses on any responses that would mention hat-havingness that screen for the three possible conditions: notsure, yes, or no.
default "notsure" as only "havehat"
And then have AI Script in responses that rewrote that (rem "no" as only "havehat") when I found out for sure. And conditional responses on any responses that would mention hat-havingness that screen for the three possible conditions: notsure, yes, or no.
Patricia
20 years ago
20 years ago
Greylin wants to reset the memories between chats. The default statement will not do this as it is used to set an initial value and is only executed if the memory doesnt exist.
At first I did as Isaacc suggests and placed AIScripts in xhello and xinitiate to reset the memory at the beginning of the chat. It didnt work as expected. The problem is that you cant count on these x-keyphrases. Too many of chats dont start with them. (xgoodbye, and xgottago arent better in this aspect)
The only way to make sure a script is always executed is in the AIScript line at the beginning of the language center.
You can go one step further by adding a second memory if you want your bot to remember what happened during a previous chat:
AIScript: default "dont know" as "hat"; remember (mem-hat) as only "lasttime"; remember "dont know" as only "hat"
This works perfectly as the script is parsed from left to right. Im not sure the default is necessary, but I placed it there just to make sure the script isnt interrupted because of a non-existed (mem-hat) memory, just like a respons is ignored when it's followed by an AIScript with a non-existend memory.
At first I did as Isaacc suggests and placed AIScripts in xhello and xinitiate to reset the memory at the beginning of the chat. It didnt work as expected. The problem is that you cant count on these x-keyphrases. Too many of chats dont start with them. (xgoodbye, and xgottago arent better in this aspect)
The only way to make sure a script is always executed is in the AIScript line at the beginning of the language center.
You can go one step further by adding a second memory if you want your bot to remember what happened during a previous chat:
» More new posts: Doghead's Cosmic Bar