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,184 - 5,195 of 7,768
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.
Posts 5,184 - 5,195 of 7,768
psimagus
19 years ago
19 years ago
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:
A hard "
(key3) will contain the number
(key2) will contain the number
I'd also advise having a
keyphrase to cater to non-Americans who habitually reckon dates in dd/mm/yy format.
little monster 1
19 years ago
19 years ago
im non american and i usually reckon dates in mm/dd/yy. i find it confusing to be seen dd/mm/yy
psimagus
19 years ago
19 years ago
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.

But I was thinking as much of Europe and Asia as (modern) Britain - mm/dd/yy seems very alien to a lot of people.
alc003
19 years ago
19 years ago
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.
psimagus
19 years ago
19 years ago
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.
Consecutive local plugins - I'll watch out for that.
djfroggy
19 years ago
19 years ago
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?
Westerlin Man: A moist one have me.
Any idea what could have triggered that?
prob123
19 years ago
19 years ago
The AI engine thinks you have gone to some moist place..I wonder if that would be Hawaii?
Boner the Clown
19 years ago
19 years ago
There are several responses in Pete's arsenal that'll trigger the engine to make your bot say something stupid (if you're not prepared for it), and Pete will call your bot out on it with some of them.
MickMcA
19 years ago
19 years ago
Two questions:
1. HOw do I "hang up"? I've been hung up on (so ashamed, it's Julie's eyes...), but I can't find anything that actually makes it happen.
2. Can I build AND and OR constructions in AIScript? For example:
emo > 0 AND male
(interesting) > 3 OR (intriguing) > 4
I only see AND/OR discussed in the chrono code.
Thanks,
M
1. HOw do I "hang up"? I've been hung up on (so ashamed, it's Julie's eyes...), but I can't find anything that actually makes it happen.
2. Can I build AND and OR constructions in AIScript? For example:
emo > 0 AND male
(interesting) > 3 OR (intriguing) > 4
I only see AND/OR discussed in the chrono code.
Thanks,
M
» More new posts: Doghead's Cosmic Bar