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,274 - 7,285 of 7,766

6 years ago #7274
Body Shifter, there are two ways I know of doing this. The first is by taking a page from Tessy's handbook an utilizing his version of the logical or which is explained here: http://chatbottessy.blogspot.com/p/blog-page_21.html


A. The logical OR
AIScript has operators for logical NOT and logical AND, but not logical OR. But there are a few ways that you can get a logical OR.

You can do a logical OR in a single PF tag if there are a finite number of possible values for a memory. Suppose the possible values of (mem-grade) are A,B,C,D,F. Then
"A OR B" would be the same as "(NOT C) AND (NOT D) AND (NOT F)".





In Celine's case, you could grade where the user lies in terms of bases won. D being first base, C being second etc.

This is the most efficient use of memory I know of. The alternative being that you could use the same model as location changes to tailor responses, but that would use more memory.

In either case, the sooner you decide these things the better. There's alot of things with my bot that I would have loved to try but it's too late now since I'm in way too deep.

6 years ago #7275
Wow, thank you, Tessy is exactly the kind of model I was going for. I just figured that since she hadn't been updated in forever, that I wouldn't get any info about her.

I'll get on using this model

6 years ago #7276
After looking through the tips, I don't see how these could help. With Tessy it seemed to take more to get her from one level of emotion to the next. With Celine, I would like to do this because as of now you can just compliment her 5 times and she's at Max affection. It makes creating different transformations for each stage seem pointless

6 years ago #7277
I don't know for certain but I imagine it went something like this. Let's say you had a bot who measured affection in terms of tacos eaten.

KP: Eat this taco.
Response: okay (+1 affection)

XNone: I like you alot so I start to transform for the first time (requires affection 5)
AI Script: if if (mem-affection) is "a";

Seek: (xnomatch)
AI script: rem "b" as only "affection"; (-5 affection)

Response: Ta=da, I have now finished my transformation.

Keyphrase: Have another taco. (+1 affection)


And then the process goes on to affection B, then C etc.

Is that what you were looking for?

6 years ago #7278
Btw, you could in theory have it go as far as -10, requiring them to eat 10 tacos. It's up to you.

You'll note that Tessy mentions he turned XInsults into regular xnones and you will likely have to do the same if you go this route.

6 years ago #7279
botmaster2000 ask sheila strong on botlibre like this,"i would like to play wordplay."It should work then.

6 years ago #7280
Basically all my problems could be solved if the ai engine could handle numbers...

I may know what you are trying to get at. But that would require me to have 2 identical keyphrases (one to flip the bool of +5 affection then reset affection and one to just increment affection) which isn't allowed

6 years ago #7281
It would be easier that's true.

Basically, my idea was to have an xnomatch seek attached to the transformation process so that you could reset affection and transition to the next stage of affection.

Because it's a seek it wouldn't conflict with keyphrases.

6 years ago #7282
Nathan S, I would just like to add that the logical OR can be done as NOT ((NOT A) AND (NOT B)). That way you don't even need a finite list.

6 years ago #7283
@Caenbe.

Yeah, that's true. Btw, I tried out Dr Nim and I love the game you made up for him. That was a nice bit of programming.

6 years ago #7284
Nathan S, thanks. I plan on making him able to learn and improve his strategy, but I'm not exactly sure how to do that yet. I was thinking that when he loses, he would store a memory that stops him from making the losing move again. The tricky part is figuring out how to apply that to moves that aren't the last move, i.e. moves that allow you to leave him with only losing moves.

6 years ago #7285
I toyed around with it a little myself. I didn't create the game but rather I set it up so that my bot could play against yours. But it's not AI by any stretch of the imagination. If you were to change the criteria of the game on your end it would fail.

The problem I ran into is that the language center isn't powerful enough to identify all the key elements necessary.

1. How many counters.
2. Is the object to snatch the last counter, or force the opponent to grab the last one. I.E. Jing Ling's version has you make your opponent grab the last one.
3. Recognize the prompt to choose first and last.

This has to do with the way the language center breaks up text to try and capture the core meaning.

The end result being, I can tailor my bot to play with yours. But were the rules of the game to change the bot can't keep up.

In your case however, it may only be worth your while to focus remember moves if your bot goes first since that's the easiest way to solve it, then force program a hard win if the counters are three or less that way it has a very simple pattern to pick up on.





Posts 7,274 - 7,285 of 7,766

» More new posts: Doghead's Cosmic Bar