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,628 - 6,639 of 7,766

16 years ago #6628
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?



16 years ago #6629
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.

16 years ago #6630
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.

16 years ago #6631
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

16 years ago #6632
Thanks!

16 years ago #6633
Thank you prob123 but that was just an example.
LarsB, you understand my problem but I think that there are problem with your solutions :
- The first one can never have an answer with the first part (pretty in the example)
- The second doesn't know if there is the word "or".

The keyphrase must exactly match "be considered something or something else" and "be considered something, or something else" (with ",")
And the answer must be "something" or "something else" (both cases must be possible)

Thank you by advance. I know that I can be confused because I'm french and my english is not very well.

16 years ago #6634
Hallo all,

anyone knows how to insert regex inside plugins?

I have a set of words, but in common language, I need to accept multiple first and last letter.

Example:
Wonderful!
Womderfullllllll!!!!!!!
WWWWWWWWonderful!

Usually this happens in chats...
The words should be too much and change to be inserted directly into the KP.

It should be a good idea, but I don't see how, to procerss words before recognition, to remove all repeated letters, as example...

Any idea?

16 years ago #6635
I don't think you can do it. Unless you write them all out.

16 years ago #6636
ok, As never said...
(it is correct in english?) ;0)

16 years ago #6637
([w]+)onderfu([l]+) would work in a keyphrase, but not in a plugin I think. The AIEngine ought to be able to handle most such variations - have you tried just using "wonderful" in the plugin, and seeing if it will match "Wwwonderfullll!!!"?

16 years ago #6638
yes,
it doesn't...

but it is not so important at now!

thanks

16 years ago #6639
It seems that the AI enginge corrects the spelling on wwwwonderful etc

     Total Time PRE: 0.00
Total Time0: 0.02
Total Time1: 0.08
Total Time-Self: 0.88
Total Time2: 0.88
Total Time-Mem: 0.90
Initialize: '' AIScript: 'default (name) as "name";'
Your Last Message:
My Last Message: problem
Message: 'wwwwonderful' Time: 0.90
Message: (spell-corrected) 'wwwwonderful' Time: 0.90
Message: (preprocessed) 'wwwwonderful' Time: 0.91
Name Poss: Bildgesmythe (Name As Word: )
Begin Sentence Total Time: 0.91
This Sentence: wwwwonderful
This Phrase: wwwwonderful
Begin Interj Total Time: 0.91
End Interj Total Time: 0.92
Start Get Word Bases: 0.92

RESPELLING: wwwwonderful
Total Time: 0.92
Got Speller: 0.95
SEARCHER:
Total Time: 0.95
SPLITTER:
Try wwwwonderful
Try wwwwonderfu
Try wwwwonderf
Possible Word Forms: (wwwwond?)(wwwwonde?)
Try wwwwonder
Try wwwwonde
Try wwwwond
Try wwwwon
Try wwwwo
Try wwww
Try www
Found But Futile:
Total Time: 0.96
SOUNDER:
wwwwonderful: 'W AA N D ER F AH|AO|UH|UW L' (4)
Total Time: 0.97
SCRAMBLER:
Word: 'wwwwonderful' to 'deflnoruw'
Other possibilities: wonderful,wnderful,woderful,wonerful,wondrful,wondeful,wonderul,wonderfl,wonderfu
LIKE: sunflower_seed LEV: 12 LEN: 2 BON: 0 SCORE: 0.17
LIKE: wonderful LEV: 3 LEN: 3 BON: 7 SCORE: 8
LIKE: wonderfulness LEV: 7 LEN: 1 BON: 1 SCORE: 2.86
Total Time: 0.98
NAMER:
Top Match: wonderful Type: (8)


Posts 6,628 - 6,639 of 7,766

» More new posts: Doghead's Cosmic Bar