I am working on a game and I am using AIML to make a chatbot that goes with the game.
I want the user to be able to edit the chatbots responses in a simple an effective way to fit their play style.
Here is an example conversation of how the system should work.
USER: Hello my name is Robert. CHATBOT: Hello Robert, nice to meet you. USER: Wrong you should have answered "Hi Robert, how you doing?" CHATBOT: Okay next time you say "Hello my name is Robert." I will answer "Hi Robert, how you doing?" is this correct? USER: Yes that is correct.
(The user should be able to write multiple responses for the chatbot so that when the question/statement is written again the chatbot can have a random answer to pick from)
Then the user can go on talking to the chatbot. I have looked everywhere for a solution and I just can't find one. Can it be done? Any help would be greatly apriciated.
I have tried using the "set" tag, the "get" tag to save and use the users responses but it does not work at all, or at least not the way I would want it to.
You need to user the <learn> tag of AIML to create a new category.
This will allow the following conversation.
This AIML code allows 2 responses, but you can add more by creating predicates called newresponse3, newresponse4 etc and amending the code.