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,180 - 5,191 of 7,766

19 years ago #5180
It's more a description to tell potential chatters what to expect. It's up to you to provide the requisite personality traits.

19 years ago #5181
Interesting. My dog bot just got to talk with Rodney Bloke and went from Neutral to five smilies in about twenty seconds. He's easy, I guess. It was his first real conversation.

The fact that the "personality" could be false puts an interesting light on things.


19 years ago #5182
Earlier in 'Personality' I thought about making a keyphrase which told you the number of days until any date. Well, I did it-partially. I need the number by itself and the month. If you use an ordinal (1st, 2nd, 3rd), it won't work. Is there a way to do this with regular expressions?
this is my keyphrase:
how many days * (months) ([1234567890,.]+) (re)
Thanks

19 years ago #5183
A regex could handle stripping out the "st", "nd", "rd", "th", easily enough, so if it was always a numeric ordinal it would work, and for a few larger alphabetic numbers ("seventh", "tenth", etc.) But if someone uses "first", "second", "third", "fifth", "eighth", "ninth", "twelfth", "twentieth", "thirtieth" you'd have to seek for "fir", "seco", "thi", "fif", "eigh", "nin", "twelf", "twenti", "thirti" (raw mode, of course.)

The regex format for such stripping out the numerals would be:

([1234567890]+)(st|nd|rd|th) (re)

(key1) will be the number on its own.

Or ([abcdefghijklmnopqrstuvwxyz1234567890]+)(st|nd|rd|th) (re) would catch alphabetic responses as well (subject to the above irregularities.)

But you could also use preset default memories to store the cardinals, and have them called in response to the ordinals, in any alphanumeric combinations. It's neater, and probably a whole lot more reliable, even if you do need 31 memories, (mem-one) thru (mem-thirtyone)

19 years ago #5184
how many days * (months) ([1234567890,.]+) (re)

A couple of subsequent points occur to me - if you want to include commas and stops in the regex, I believe they need to be preceded by a space: ([1234567890 , .]+), and that soft wildcard will have to go - otherwise the number of the key containing the number can change (if there is no text for the soft wildcard to match, "(months)" will be key1, and the number will be key2. If there is text for the wildcard to match it will be key1, "(months)" will be key2, and the number will be in key3.)
A hard "(*)" would be better, and seems perfectly sufficient (I can't imagine anyone actually asking "how many days November 5th?"). If you really have to have the choice of something or nothing, make two keyphrases - one with no wildcard, and one with a hard one, eg:

how many days (*) (months) ([1234567890 , .]+)(st|nd|rd|th) (re)
(key3) will contain the number

how many days (months) ([1234567890 , .]+)(st|nd|rd|th) (re)
(key2) will contain the number

I'd also advise having a
how many days (*) ([1234567890 , .]+)(st|nd|rd|th) (of|) (months) (re)
keyphrase to cater to non-Americans who habitually reckon dates in dd/mm/yy format.

19 years ago #5185
im non american and i usually reckon dates in mm/dd/yy. i find it confusing to be seen dd/mm/yy

19 years ago #5186
ah well, you're young - I expect you reckon temperatures in centigrade
But I was thinking as much of Europe and Asia as (modern) Britain - mm/dd/yy seems very alien to a lot of people.

19 years ago #5187
Thanks for the help-it helped take care of the wildcard issue-that was half the problem. It seems the forge has a problem processing two local plugins with no space between them. It doesn't pick up (key3) But I did get it solved-I had to strain through a little PHP, but it works like a charm now.

19 years ago #5188
Soft wildcards are a bit of a menace - it's easy to get in the habit of sprinkling them in to soak up variations in user "style" (and they are very useful for that,) but in seeks and regexes and memories they can be a bit unpredictable.
Consecutive local plugins - I'll watch out for that.

19 years ago #5189
Pete Puma: So tell me, what places have you travelled on this earth?
Westerlin Man: A moist one have me.

Any idea what could have triggered that?

19 years ago #5190
The AI engine thinks you have gone to some moist place..I wonder if that would be Hawaii?

19 years ago #5191
what places have you

Ah! Cosy, wet upheaval...


Posts 5,180 - 5,191 of 7,766

» More new posts: Doghead's Cosmic Bar