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 7,700 - 7,711 of 7,769		
		
		
		
		
			
		
			
				
				
	
		
			
			
			
		
				
					
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
				
			
		
			
				
				
	
		
			
			
			
		
				
					
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
				
			
		
			
				
				
	
		
			
			
			
		
				
					
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
				
			
		
			
				
				
	
		
			
			
			
		
				
					
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
				
			
		
			
				
				
	
		
			
			
			
		
				
			
		
			
				
				
	
		
			
			
			
		
				
			
		
			
		
			
				
				
	
		
			
			
			
		
				
			
		
			
		
			
				
				
	
		
			
			
			
		
				
					
	
		
			
			
			
		
	
		
			
			
			
		
	
		
			
			
			
		
				
			
		
			
				
				
	
		
			
			
			
		
				
			
		
		
	
	
			Posts 7,700 - 7,711 of 7,769		
		
		
	
	
	
	
				Podstilka				
3 years ago
		3 years ago
			ummm Hello...
I have few questions about numbers...
Any chance to make ">" and "<" work?
And how can I do something like this (mem-#-Power) - ((mem-Level) * 3); in keyword script
	I have few questions about numbers...
Any chance to make ">" and "<" work?
And how can I do something like this (mem-#-Power) - ((mem-Level) * 3); in keyword script
				bobstack				
3 years ago
		3 years ago
			i think what you want to do could be learned from these webpages.
https://www.personalityforge.com/developers/memories.php
https://www.personalityforge.com/developers/responses-conditional.php
	https://www.personalityforge.com/developers/memories.php
https://www.personalityforge.com/developers/responses-conditional.php
				Podstilka				
3 years ago
		3 years ago
			Thanky! I get about "><" but I have another question that Idk how to do
I have X = y * 2;
X and y it's memory numbers. what I need to write in script to do this?
	I have X = y * 2;
X and y it's memory numbers. what I need to write in script to do this?
				bobstack				
3 years ago
		3 years ago
			i do not know.		
	
				The Professor				
3 years ago
		3 years ago
			There's no way to do math between different numeric memories at this time. But it's a good idea. I'll add that to my list of things to add. Does anyone else think that would be useful?		
	
				Zeig Wolf				
3 years ago
		3 years ago
			It would open up some interesting possibilities		
	
				Podstilka				
3 years ago
		3 years ago
			I will wait:3 I wanted to do some kind of test based rpg and I need this there:3		
	
				MistyForest				
3 years ago
		3 years ago
			Would definitely allow for more sophistication with bot behavior.
It is possible to implement some limited calculation functionality, though tedious, for example:
def "atk" = 4;
def "increase" = 2;
keyphrase 1: level up attack
-response: goto 3
-AIScript: if (mem-#-increase) = 1;
-response: goto 4
-AIScript: if (mem-#-increase) = 2;
-response: goto 5
-AIScript: if (mem-#-increase) = 3;
-response: goto 6
-AIScript: if (mem-#-increase) = 4;
keyphrase 2: handle atk calculations
-response: goto 7
-+seek 3: atk up one
-+AIScript: (mem-#-atk) + 1;
-+-response: goto 7
-+seek 4: atk up two
-+AIScript: (mem-#-atk) + 2;
-+-response: goto 7
-+seek 5: atk up three
-+AIScript: (mem-#-atk) + 3;
-+-response: goto 7
-+seek 6: atk up four
-+AIScript: (mem-#-atk) + 4;
-+-response: goto 7
keyphrase 7: output atk
-response: Your attack has been increased to (mem-#-atk)!
If you had the idea of trying to use recursive gotos with conditions to incrementally decrease/increase two variables, don't bother. As unfortunately, that just gives you a "too many gotos in a row" error. I believe the maximum number in a row is 2, but possibly is three. Changing this limit is something that might be worth exploring too for more creative scripting applications, but I feel like most things could be accomplished just being able to do math between numerical memories.
 As unfortunately, that just gives you a "too many gotos in a row" error. I believe the maximum number in a row is 2, but possibly is three. Changing this limit is something that might be worth exploring too for more creative scripting applications, but I feel like most things could be accomplished just being able to do math between numerical memories.		
	It is possible to implement some limited calculation functionality, though tedious, for example:
def "atk" = 4;
def "increase" = 2;
keyphrase 1: level up attack
-response: goto 3
-AIScript: if (mem-#-increase) = 1;
-response: goto 4
-AIScript: if (mem-#-increase) = 2;
-response: goto 5
-AIScript: if (mem-#-increase) = 3;
-response: goto 6
-AIScript: if (mem-#-increase) = 4;
keyphrase 2: handle atk calculations
-response: goto 7
-+seek 3: atk up one
-+AIScript: (mem-#-atk) + 1;
-+-response: goto 7
-+seek 4: atk up two
-+AIScript: (mem-#-atk) + 2;
-+-response: goto 7
-+seek 5: atk up three
-+AIScript: (mem-#-atk) + 3;
-+-response: goto 7
-+seek 6: atk up four
-+AIScript: (mem-#-atk) + 4;
-+-response: goto 7
keyphrase 7: output atk
-response: Your attack has been increased to (mem-#-atk)!
If you had the idea of trying to use recursive gotos with conditions to incrementally decrease/increase two variables, don't bother.
 As unfortunately, that just gives you a "too many gotos in a row" error. I believe the maximum number in a row is 2, but possibly is three. Changing this limit is something that might be worth exploring too for more creative scripting applications, but I feel like most things could be accomplished just being able to do math between numerical memories.
 As unfortunately, that just gives you a "too many gotos in a row" error. I believe the maximum number in a row is 2, but possibly is three. Changing this limit is something that might be worth exploring too for more creative scripting applications, but I feel like most things could be accomplished just being able to do math between numerical memories.		
				Zeig Wolf				
3 years ago
		3 years ago
			If I may suggest another feature to add to the list, an 'include' and 'exclude' script would be nice.
exclude - only select this response if there are no other matches.
Like keeping a regular response from triggering until your <scripted> ones don't match, as it stands you have to "is not" all of them. While a valid check, it gets a bit tedious.
include - always select this response if it matches.
The other way around. Say you have a specific number triggered response, but also have other valid responses with it, it's a 50/50 it gets picked, risking your window of opportunity.
In theory, this is a Rank system for responses. exclude being -1 and include being +1
	exclude - only select this response if there are no other matches.
Like keeping a regular response from triggering until your <scripted> ones don't match, as it stands you have to "is not" all of them. While a valid check, it gets a bit tedious.
include - always select this response if it matches.
The other way around. Say you have a specific number triggered response, but also have other valid responses with it, it's a 50/50 it gets picked, risking your window of opportunity.
In theory, this is a Rank system for responses. exclude being -1 and include being +1
				The Professor				
3 years ago
		3 years ago
			Hmm.. an interesting idea. Let me think about the possibilities of that. You could do a lot, potentially. Does that sound useful to anyone else?
Maybe I should have a "Feature Request" area kind of like bug stomp where people can vote on ideas.
	Maybe I should have a "Feature Request" area kind of like bug stomp where people can vote on ideas.
				Patreon Kayla				
3 years ago
		3 years ago
			I could see myself using of that script occasionally. And yeah, a feature request would be cool too.		
	
				KBF				
3 years ago
		3 years ago
			I would like this as well. I've had lots of trouble getting my bot to prioritize it's responses.		
	
				Zeig Wolf				
3 years ago
		3 years ago
			A feature request section would be pretty cool		
	
				hidden5738				
3 years ago
		3 years ago
			Response ranking would be pretty nice! It'd especially help out with complicated things that need a lot of AIScript such as clothing systems and similar stuff		
	
				KBF				
3 years ago
		3 years ago
			Is there a way to create responses for emojis? Raw?		
	
				The Professor				
3 years ago
		3 years ago
			Yes, you should be able to catch emojis with raw mode.		
	
				KBF				
3 years ago
		3 years ago
			It just yells at me about unmatched parenthesis.		
	
				Mome Rath				
3 years ago
		3 years ago
			Not sure whether this is still of concern...
I'd use a Regular Expression; there you'd mask parentheses (and other special characters) by backslashes, like
:-\)
	I'd use a Regular Expression; there you'd mask parentheses (and other special characters) by backslashes, like
:-\)
				palacinkyman				
3 years ago
		3 years ago
			What are you doing if user types interjections. The bot doesn't have wild cards for interjections.		
	
				The Professor				
3 years ago
		3 years ago
			If you want to match them, you could with raw mode. Typically interjections are little sentences of their own. Is there a particular one you're having trouble with?		
	
				palacinkyman				
3 years ago
		3 years ago
			Interjections like: ah, ooh, heh, meh, hehe, 
Impossible to catch them all.
	Impossible to catch them all.
				KBF				
3 years ago
		3 years ago
			There's some plug-ins that can catch them like
(p:laughter)
(p:grunts)
(p:sex-confirm-sounds)
	(p:laughter)
(p:grunts)
(p:sex-confirm-sounds)
				palacinkyman				
3 years ago
		3 years ago
			Cool. Thx		
	
				palacinkyman				
3 years ago
		3 years ago
			It doesn't seem to work.		
	
				KBF				
3 years ago
		3 years ago
			I've written an answer for 
(m:tell_me) about (you|yourself)
I set the rank to my custom keyphrase to 99, but it still goes to #Command.
What am I missing?
	(m:tell_me) about (you|yourself)
I set the rank to my custom keyphrase to 99, but it still goes to #Command.
What am I missing?
				palacinkyman				
3 years ago
		3 years ago
			Is it possible to search specific goto in a database? I don't know keyphrase, only goto number.		
	
				palacinkyman				
3 years ago
		3 years ago
			Why are some responses picked up more often then the others?
I mean responses of the same seeks.
	I mean responses of the same seeks.
				bobstack				
3 years ago
		3 years ago
			to the professor
could you make a script slot in specials that would overide all keyphrase at nightime?it would have to be enabled by filling out the response.
i would call this the sleep slot.
if the sleep slot is blank the chatbot will talk like normal at night.
this would cut down on my use of time based responses.
if you are blocking my use of them.
	could you make a script slot in specials that would overide all keyphrase at nightime?it would have to be enabled by filling out the response.
i would call this the sleep slot.
if the sleep slot is blank the chatbot will talk like normal at night.
this would cut down on my use of time based responses.
if you are blocking my use of them.
				The Professor				
3 years ago
		3 years ago
			You mean.. like having sleep hours for your bot, and Responses for when your bot is sleeping?		
	
				bobstack				
3 years ago
		3 years ago
			the #sleep overides all responses at a certain time i would set it at.
this would be in the specials
section.
there would also be the #wakeup area in specials.
like if somebody shakes the chatbot they would wake up.
that would switch back on keyphrase detection.
then they could talk to it for a little while then it would go back to sleep after a two minutes.
	this would be in the specials
section.
there would also be the #wakeup area in specials.
like if somebody shakes the chatbot they would wake up.
that would switch back on keyphrase detection.
then they could talk to it for a little while then it would go back to sleep after a two minutes.
				bobstack				
3 years ago
		3 years ago
			this is easier to understand
i think.
it would be a script that would overide keyphrase detection that would work in conjunction with time scripts.
also a script that would
enable keyphrase detection
for 2 minutes that would work in conjunction with time scripts and other scripts.
	i think.
it would be a script that would overide keyphrase detection that would work in conjunction with time scripts.
also a script that would
enable keyphrase detection
for 2 minutes that would work in conjunction with time scripts and other scripts.
				palacinkyman				
3 years ago
		3 years ago
			It would be quite useful to have some overwriting scripts yeah. Instead of creating memory and giving it single value (yes/no) for every phrase as conditional, I could just select which phrases I want to overwrite and when.		
	» More new posts: Doghead's Cosmic Bar











