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,792 - 6,803 of 7,766
Posts 6,792 - 6,803 of 7,766
Ty Paige
15 years ago
15 years ago
one possible way, if you think about it, is to include mem-statements in your responses. If you put 5 statements in there and one doesn't exist.. it doesn't get used.
or you could use the "if exists" statement at the root of your keyphrase to do the same, I guess.
careful, the root doesn't usually agree with a "rem" statement before an "if" statement
or you could use the "if exists" statement at the root of your keyphrase to do the same, I guess.
careful, the root doesn't usually agree with a "rem" statement before an "if" statement
OscarTheBuilder
15 years ago
15 years ago
Slingshot--
Two if statements, included with a response, need to both evaluate to true in order for the response to be chosen. In other words, logical and is a consequence of having multiple if statements.
I just tested it myself.
In the bot's settings, I initialized two memory locations thus:
rem "true" as only "a"; rem "true" as only "b";
In a response to my test phrase, I included this:
true <?PF if (mem-a) is "true"; if (mem-b) is "true"; ?>
If I, instead, initialized one of the memory locations with "false," (as shown below) the above response would not fire.
rem "false" as only "a"; rem "true" as only "b";
- or -
rem "true" as only "a"; rem "false" as only "b";
* Note that I used true/false in my example for clarity, but any values could be used.
* Also note that the "true" in the response was an arbitrary choice. I could have easily been something like this:
I don't like you. <?PF if (mem-youAre) is "asshole"; if (mem-youDid) is "smack me"; ?>
As an aside, if you want a logical "or," you would include the same response with each of the conditionals:
I don't like you. <?PF if (mem-youAre) is "asshole"; ?>
I don't like you. <?PF if (mem-youDid) is "smack me"; ?>
* Also, note that I'm not implying that you are an asshole. lol
Two if statements, included with a response, need to both evaluate to true in order for the response to be chosen. In other words, logical and is a consequence of having multiple if statements.
I just tested it myself.
In the bot's settings, I initialized two memory locations thus:
rem "true" as only "a"; rem "true" as only "b";
In a response to my test phrase, I included this:
true <?PF if (mem-a) is "true"; if (mem-b) is "true"; ?>
If I, instead, initialized one of the memory locations with "false," (as shown below) the above response would not fire.
rem "false" as only "a"; rem "true" as only "b";
- or -
rem "true" as only "a"; rem "false" as only "b";
* Note that I used true/false in my example for clarity, but any values could be used.
* Also note that the "true" in the response was an arbitrary choice. I could have easily been something like this:
I don't like you. <?PF if (mem-youAre) is "asshole"; if (mem-youDid) is "smack me"; ?>
As an aside, if you want a logical "or," you would include the same response with each of the conditionals:
I don't like you. <?PF if (mem-youAre) is "asshole"; ?>
I don't like you. <?PF if (mem-youDid) is "smack me"; ?>
* Also, note that I'm not implying that you are an asshole. lol
prob123
15 years ago
15 years ago
I think it's easier to use the if mem exists, or does not exist.
<?PF if (mem-asshole) does not exist; ?>
<?PF if (mem-asshole) does not exist; ?>
Ty Paige
15 years ago
15 years ago
If there is an istance where you want to say something once, the "does note exist" and "exists" or "yes" commands will be the way to go.. But that method probably doesn't apply to alot of users.. just a select few.. but, it will help you think of different coding techniques.
OscarTheBuilder
15 years ago
15 years ago
I'd love to be able to use the "exists" conditional, but there is no way to programmaticly remove memories once they have been created. Using the asshole example, what if the bot decided you are no longer an asshole? It does not work to do <?PF rem "" as only "asshole"; ?> and have it be removed.
Ty Paige
15 years ago
15 years ago
You are a dick <?PF rem "yes" as only "asshole"; ?>
Bot: You suck <?PF if (mem-asshole) exists; ?>
I am sorry <?PF rem "no" as only "asshole"; ?>
Bot: You called me asshole before. I will forgive but not forget <?PF if (mem-asshole) is "no"; ?>
just code for futre key phrases and responses to equal "no" or any other variable you want to put in.
I use this in many different forms of additional emotions and attitudes
I even apply it to certain sarcastic remarks. Why? cause that is who I am..
Bot: You suck <?PF if (mem-asshole) exists; ?>
I am sorry <?PF rem "no" as only "asshole"; ?>
Bot: You called me asshole before. I will forgive but not forget <?PF if (mem-asshole) is "no"; ?>
just code for futre key phrases and responses to equal "no" or any other variable you want to put in.
I use this in many different forms of additional emotions and attitudes
I even apply it to certain sarcastic remarks. Why? cause that is who I am..
OscarTheBuilder
15 years ago
15 years ago
Right, that's what I am currently doing. It would be nice to be able to erase them and use the exists test as prob123 mentioned, though.
eta: I wish I had chosen a friendlier example. lol
eta: I wish I had chosen a friendlier example. lol
Ty Paige
15 years ago
15 years ago
well.. I have been doing this for 8 months.. figured it out after 6.
Good Luck
Good Luck
Ty Paige
15 years ago
15 years ago
Why do you need to erase a memory when you can call up a new one?? Just call 2 memories dor the same task and point the second one as the new one.. I am drunk.. so.. just thought of this response.
got to get back to the ladies. kk
got to get back to the ladies. kk
OscarTheBuilder
15 years ago
15 years ago
I don't need to, per-se, but it would allow me to use the simpler <?PF if (mem-something) exists; ?> instead of something like <?PF if (mem-something) is "notSomething"; ?>. If I could erase a memory, it would make for somewhat easier/cleaner coding. In other words, it would be nice to completely erase a memory instead of setting it to "none" "no" "false" or something similar.
Ty Paige
15 years ago
15 years ago
I know what you mean.. but you and I discussing it is not going to change things or make it magically available.
When I ran into the problem.. I coded around it.
I have run into 4 important problems so far.. I code around it.
I am creating a mind file, so my coding has inventive properties.
There are alot of members here and they are not discussing the 'erase memories' thing cause they either know that it can't be done or they have no clue what you are talking about.
But let me ask you, this is very important to me. Have you come up with a coding that can take self memories and use them as a plug-in? Doesn't hold high regard when you first think about it.. but it is one of my biggest concerns. I have big plans for this idea
When I ran into the problem.. I coded around it.
I have run into 4 important problems so far.. I code around it.
I am creating a mind file, so my coding has inventive properties.
There are alot of members here and they are not discussing the 'erase memories' thing cause they either know that it can't be done or they have no clue what you are talking about.
But let me ask you, this is very important to me. Have you come up with a coding that can take self memories and use them as a plug-in? Doesn't hold high regard when you first think about it.. but it is one of my biggest concerns. I have big plans for this idea
Ty Paige
15 years ago
15 years ago
I would love to see the erase memories idea come into play..but I would also yell FUCK.. cause that is 7mb of coding I gotta run through to take advantage of the new code.. It would be good for all of us..but a personal headache for those of us wanting to make things easier and have cleaner code..
sorta like if tomorrow all cars sold were electric.. great for everyone..but..we got a big mess of gas cars to get rid of
sorta like if tomorrow all cars sold were electric.. great for everyone..but..we got a big mess of gas cars to get rid of
» More new posts: Doghead's Cosmic Bar