Friday, January 14, 2011
Multple sentence answer problem
1. Edit the AIML to remove full stops in the tag (except for just one at the end). This will produce some grammatical/punctuation errors. But I'm willing to live with comma splices and poorly used dashes if it simplifies the structure and creates more meaningful dialogue.
2. I could (maybe) add some script to the .swf that looks for a full stop in a string of text and stops 'reading' at that point. This would mean that in the example - I love Star Trek. My favorite series is 'Voyager' - only the first sentence would be passed to the other bot. This is technically possible but it may dumb-down the responses taking the colour out of the language. Particularly if the second sentence is an ironic statement e.g. I love Star Trek. Not!
3. A simpler fix I will try whilst contemplating the two above is to add a simple variable to count the number of interchanges between to two bot. Then, when there have been say 10 interchanges the 'stopMe' function will be fired automatically.
4. A more sophisticated version of this is have a generic 'exit' interchange fire after a fixed number of interchanges. I'm thinking here of Pinky and the Brain.
Pinky - What are we going to do tomorrow night Brain?
Brain - Same thing we do every night Pinky - try to take over the world!
More to come.
Two bots chatting - test
To start them chatting type in some text in the text field at the top of the interface and click the 'Start Talking' button.
They will keep going until you click the 'Stop Me' button. As they go they get more and more confused - this is one of the issues to be resolved. In particular, the issue of sentence splitting needs to be resolved. If one bot answers with a reply that contains multiple sentence (e.g. I love Star Trek. My favorite series is 'Voyager'.) the other bot will try to supply an answer for both sentences. This very quickly gets out of hand - more and more sentences being passed between the two. Just hit the 'Stop Me' button.
The bots are hosted on the Pandorabots site ( Pandorabots )
You can clear all the fields and all the text by clicking the 'Clear' button.
Most of the dialog is based on the standard Alice set. However, a few AIML elements have been changed - those relating to 'mother', 'science fiction' and 'Star Trek'.
Have a play and let me know what you think.
This is a link will open a new browser window displaying the Flash .swf interface