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,620 - 6,631 of 7,766
Posts 6,620 - 6,631 of 7,766
prob123
16 years ago
16 years ago
For the comma If you want your Keyphrase to depend on punctuation, use raw mode. The rule for matching punctuation is this: every period, comma, question mark, and exclamation point will have a space in front of it, so your Keyphrases must also have a space in front of them in order to match. This is the only processing done in raw mode, and is necessary for the rest to work. Note also that you cannot match a comma unless you are using a regular expression Keyphrase in raw mode. Commas are otherwise used for lists of Keyphrases.
LarsB
16 years ago
16 years ago
I never use raw mode so I cannot tell if prob123 is correct - from my experience with matching punctuation I can tell that you can successfully match a comma without using RAW mode:
([,.+]) (re)
(prekey) would be: is blue powder a winter
(postkey) would be: or a summer color
([,.+]) (re)
(prekey) would be: is blue powder a winter
(postkey) would be: or a summer color
kaskroute
16 years ago
16 years ago
I tried "be considered (*)([,.+]) or (*) (re)" in raw mode.
But it doesn't match "Would blue be considered pretty or ugly?" nor "Would blue be considered pretty, or ugly?"
How can I match that? I really don't found the exact keyphrase.
Furthermore, I would like that answers are "Pretty!" or "Ugly!" in my example.
Thank you "de faire avancer le schmilblick" as we say in my country.
But it doesn't match "Would blue be considered pretty or ugly?" nor "Would blue be considered pretty, or ugly?"
How can I match that? I really don't found the exact keyphrase.
Furthermore, I would like that answers are "Pretty!" or "Ugly!" in my example.
Thank you "de faire avancer le schmilblick" as we say in my country.
prob123
16 years ago
16 years ago
I try to fake a lot
Would (blue|green|yellow) be (considered|)(*)
I think (key1) is more thrilling than (key3)
How is (key1) (key3)? etc
never use raw mode
That's just a copy and paste from the Book of AI..it better work!
Would (blue|green|yellow) be (considered|)(*)
I think (key1) is more thrilling than (key3)
How is (key1) (key3)? etc
That's just a copy and paste from the Book of AI..it better work!

LarsB
16 years ago
16 years ago
Yeah, it better work, I am not using it though.
I am still trying to remember if the skip feature was always there or that it is a recent addition to the AI engine:
Emotional Analysis:
Favorites?:
Skip 'or'
It seems to interfere with processing the following nearly identical sentences:
Message: 'would you be considered to be well programmed, or intelligent.'
Resulting in
Find: or (19) Time: 1.59
(Found)
Rank & Length Bonus: 19
Position Score: 12 (12 / (0+1))
Sentence Score: 4
(Total Rank: 35)
Highest!
and
Message: 'would you be considered to be intelligent, or well programmed?'
Resulting in
Find: be considered (*) ([,.+]) or (re) (76) Time: 1.30
(Found)
Rank & Length Bonus: 76
Position Score: 4 (12 / (2+1))
Sentence Score: 0
(Total Rank: 80)
Highest!
In both cases "or" should precede over the other based on position, correct?
I am still trying to remember if the skip feature was always there or that it is a recent addition to the AI engine:
Emotional Analysis:
Favorites?:
Skip 'or'
It seems to interfere with processing the following nearly identical sentences:
Message: 'would you be considered to be well programmed, or intelligent.'
Resulting in
Find: or (19) Time: 1.59
(Found)
Rank & Length Bonus: 19
Position Score: 12 (12 / (0+1))
Sentence Score: 4
(Total Rank: 35)
Highest!
and
Message: 'would you be considered to be intelligent, or well programmed?'
Resulting in
Find: be considered (*) ([,.+]) or (re) (76) Time: 1.30
(Found)
Rank & Length Bonus: 76
Position Score: 4 (12 / (2+1))
Sentence Score: 0
(Total Rank: 80)
Highest!
In both cases "or" should precede over the other based on position, correct?
kaskroute
16 years ago
16 years ago
Sorry prob123 but you don't have the same kind of keyphrase that I want.
Read my last entry you'll see what I exactly want.
Read my last entry you'll see what I exactly want.
LarsB
16 years ago
16 years ago
de faire avancer le schmilblick #1 using the simple key phrase "or" :
You: Would blue be considered pretty, or ugly?
Bot: Definitely ugly. (matches the "or" key phrase and ignores the comma and everything before it)
de faire avancer le schmilblick #2 using key phrase:
Find: ([abcdefghijklmnopqrstuvwxyz,.]+ty) (re) (24
You: Would blue be considered pretty or ugly? (note there is no comma)
Bot: pretty, did I really say that?
You: Would blue be considered pretty, or ugly?
Bot: Definitely ugly. (matches the "or" key phrase and ignores the comma and everything before it)
de faire avancer le schmilblick #2 using key phrase:
Find: ([abcdefghijklmnopqrstuvwxyz,.]+ty) (re) (24
You: Would blue be considered pretty or ugly? (note there is no comma)
Bot: pretty, did I really say that?
prob123
16 years ago
16 years ago
You could also use plugins. Make a plug in with the most common pretty things, and one for ugly things
are (plugin name for pretty) (ugly|pretty) or (ugly|pretty)
and answer (key1) are pretty.
are (plugin name for ugly) (ugly|pretty) or (ugly|pretty)
and answer (key1) are ugly.
are (plugin name for pretty) (ugly|pretty) or (ugly|pretty)
and answer (key1) are pretty.
are (plugin name for ugly) (ugly|pretty) or (ugly|pretty)
and answer (key1) are ugly.
marco3b
16 years ago
16 years ago
Irina, I had similar problems working on windows machines and than porting code to UNIX-like systems. I don't know if this is the case, but if you are using a windows editor and the Forge server is Linux (I don't know, but suppose) there should be two main possible couse to your problem:
1. the Forge DB for your bot is charging something big and than crashed the queries stopping the import. (try to import in your bot the export of a "new created" bot to see if it works. If yes, see below, if not, the engine for your bot is somehow corrupted and you need to have it recreated by the professor.
1. the Forge DB for your bot is charging something big and than crashed the queries stopping the import. (try to import in your bot the export of a "new created" bot to see if it works. If yes, see below, if not, the engine for your bot is somehow corrupted and you need to have it recreated by the professor.
marco3b
16 years ago
16 years ago
Ok, if the first test goes good, you have some special characters or sparse tag in your script. this, if parsed by a php engin, should often show the results that you described.
To find the problem I suggest you to use an editor that can show each characters and convert special characters between platforms (as ULTRAEDIT).
If you open your file with UE, you will have the ability to check special characters (menu view->show special characters/Tabs), delete strange things...you can ask me help in this debug type if you need. then use the menu view->view as highlightin...->HTML to have a visual map of correct tag matches. Do not use PHP highlight becouse it recognize each ' as a text dekimiter...
Let me know if this helps
To find the problem I suggest you to use an editor that can show each characters and convert special characters between platforms (as ULTRAEDIT).
If you open your file with UE, you will have the ability to check special characters (menu view->show special characters/Tabs), delete strange things...you can ask me help in this debug type if you need. then use the menu view->view as highlightin...->HTML to have a visual map of correct tag matches. Do not use PHP highlight becouse it recognize each ' as a text dekimiter...
Let me know if this helps
» More new posts: Doghead's Cosmic Bar