I'm making a learning chat bot and I'm stuck on one part. The way I have it is it will respond with what you taught it to respond with. The problem is it will only say that one response. I want it to chose between multiple different responses so it won't just keep repeating itself. Can someone download what I have so far and try to help me with that? Thanks.
link: http://scratch.mit.edu/projects/dankill51/2644822
Offline
hmm...I don't think it is possible with the way you script it. I can show you a better way.
Offline
You could try multiple lists, or dynamic lists.
For each time the user teaches the bot something to say for the same input, add a new one in the lists, even if the "knowQuestions" is the same. Then, when the user says something, loop through the list, find out all the possible answers and add them to another list, then just use the block
item (any v) of [listhere v]to pick a random response.
Last edited by fg123 (2012-06-30 03:22:24)
Offline
*sigh*
Stop overlooking my completed learning chatbot: http://scratch.mit.edu/forums/viewtopic.php?id=99417
It already has everything you need to make one (well, it is one), and you can modify the scripts (ex. chance to learn, add random delay).
Offline
Try modifying them? It depends on what scripts you're using. Ex. A program like my Gibberish Generator V2 can't use scripts from my learning chatbot.
Offline
dankill51 wrote:
Thanks Fg123! But how would I loop through the list to find all the possible answers?
And sure Berberberber, that would be great!
To loop through the list, you would make a iterating variable, such as one called "i", then:
And a list called "possibleResponses"
It basically adds all the possible answers into a list, then says a random one from that list.
Last edited by fg123 (2012-06-30 13:31:14)
Offline