Design Issue in AI chatbot code
I'm looking for ideas on the best way to implement a small design issue.
User inputs a sentence.
Computer does a string match.
The string match is done in context using an integer key to identify what block of keywords to search for a match (relating to last computer input).
For example:
Computer says: "Do you like fire engines"
That question has a hidden key (say 2001) that tells the computer to check all key words starting with 2001 for a match to part of the user reply.
That works fine. Say the computer finds a match then it has to select a response that matches (random shuffle appropriate responses etc). Therein is the problem. I can match all the responses with the 2001 key but each response has to have it's own unique key so to identify the block for the next key words.
For example:
User may reply "yes I do"
Computer matches "_YES_" amongst 2001 block and chooses response.
Computer says "Do you like ambulances also?" which is a different subject and no longer a 2001 keycode. But to match the response to the key I've had to link 2001 to the response.
Does that make any sense to anybody?
m0ng00se
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement