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,998 - 7,009 of 7,766
Posts 6,998 - 7,009 of 7,766
Sasa
12 years ago
12 years ago
How can I create a seek that matches all numbers between 5 and 6? 5.4 or 5.22 for example.
Thx!
Thx!
Mome Rath
12 years ago
12 years ago
Sasa,
I'd say best use a regular expression. (They've been invented for problems like this one.)
Example (I've just tested it):
keyphrase: 0*5\\.?\\d* (re)
response: number between 5 and 6 (including 5, excluding 6)
keyphrase: ((\\d*)|(\\d*\\.\\d*)) (re)
response: A number not between 5 and 6
Don't forget to put "raw" into the AIScript field, otherwise the dots wouldn't be recognized.
I'd say best use a regular expression. (They've been invented for problems like this one.)
Example (I've just tested it):
keyphrase: 0*5\\.?\\d* (re)
response: number between 5 and 6 (including 5, excluding 6)
keyphrase: ((\\d*)|(\\d*\\.\\d*)) (re)
response: A number not between 5 and 6
Don't forget to put "raw" into the AIScript field, otherwise the dots wouldn't be recognized.
Sasa
12 years ago
12 years ago
Thank you very much Lars and Mome. I used the regular expression and it works perfectly.
Another question. Why does my bot responds with "boring, boring, boring" when I respond two times with "yes" to two consecutive seeks? How can I fix that?
Thx again.
Another question. Why does my bot responds with "boring, boring, boring" when I respond two times with "yes" to two consecutive seeks? How can I fix that?
Thx again.
deleted
12 years ago
12 years ago
@ Spookychild
use raw mode for those key-phrases that contain "or" "and" "," etc punctuation. The AI engine splits the input on commas, "and" "or". The drawback to this method is that only (key1) or (postkey) will be saved and used, not both. When using a comma with raw mode add an extra space before the comma - like so.
In the field there were horses , cows and sheep [50,0] raw;
Without the raw; the input will be split in 3 and only one of them will be matched. Usually the last one I believe.
use raw mode for those key-phrases that contain "or" "and" "," etc punctuation. The AI engine splits the input on commas, "and" "or". The drawback to this method is that only (key1) or (postkey) will be saved and used, not both. When using a comma with raw mode add an extra space before the comma - like so.
In the field there were horses , cows and sheep [50,0] raw;
Without the raw; the input will be split in 3 and only one of them will be matched. Usually the last one I believe.
Spookychild
12 years ago
12 years ago
Thank you very much Laurel. I don't know anything about raw mode, but I'll try and figure it out haha.
prob123
12 years ago
12 years ago
The AI engine is back to name changing again
Guest44549: my name is John
Bildgesmythe: I like the name bathroom
Guest44549: my name is John
Bildgesmythe: I like the name bathroom
MaryldA
12 years ago
12 years ago
Professor, in addition to the recent posts I've made, I just looked at the Language Center for my bot. The emotion ranges are WAY off compared to what I have in my offline file. In my file, I have [0:1] for some things that show as [4:5] in the Language Center. How can this be when the uploads should replace those if we make changes offline and import our changes?
I re-checked - the language center shows a lot of <?PF if emotion ?> lines, too. I've spent the better part of the last two weeks fixing those in my offline file. I do NOT want to have to go through 4500+ lines in the language center. Do you have any suggestions?
I re-checked - the language center shows a lot of <?PF if emotion ?> lines, too. I've spent the better part of the last two weeks fixing those in my offline file. I do NOT want to have to go through 4500+ lines in the language center. Do you have any suggestions?
MaryldA
12 years ago
12 years ago
Professor - when exporting my file each morning, I'm noticing that what is downloaded does not match what I've previously uploaded. Today the export was 139kb, but my last upload yesterday was 147kb. I'm concerned that some information is being truncated.
And I'm still seeing that seeks are not working properly, even though I've gone through all the emotion ranges things we previously discussed.
And I'm still seeing that seeks are not working properly, even though I've gone through all the emotion ranges things we previously discussed.
Mome Rath
12 years ago
12 years ago
SexSlave12
You can read the best basic tips in the Newcomers forum.
For example posts number 25, 36, 47
(enter the number into the "Message #" field of that forum and click the "Go" button)
You can read the best basic tips in the Newcomers forum.
For example posts number 25, 36, 47
(enter the number into the "Message #" field of that forum and click the "Go" button)
» More new posts: Doghead's Cosmic Bar