results of more geography boredom...
I have been thinking about how one could implement my previous idea. Here is what i have come with (scrawled on the back of a geography worksheet).
When the user asks a question, do the following:
change the case
filter out uneeded words and characters (articles, punctuation, etc.)
try to find a match.
If you find a match, feed back the related answer.
if you don't:
-counter it (as before described)
-write it into the file
-write the user's response to the file
reply.
To distinguish the questions from other statements and related words, questions could either have a separate file (questions.txt) or have a separate range of id's. The related answer(s) would have the same ID and probably be in a different file (answers.txt) or another section of the main file.
The bot should also randomly ask the user a question and record the feedback so the bot can fuel it's own answer-repository.
When the bot is parsing the input, the bot could have a list of names (which are added to every time the user logs in) that it replaces with %s for subject if it finds them.
Also, to make the conversation more interesting, the bot could have a long list of generic starements and replies that have a %o in then (for object) that it uses to keep the conversation going. This (along with a variable containing the object and some way to filter out the object of conversation) would make the bot seem more coherent and intelligent.
That's all for now, :D
~Inquirer