TROUBLESHOOTING TIPS
The best way to prevent bugs (that’s computer-speak for problems with
the programming) is to try to break your own program. In fact, video game
companies hire QA (quality assurance) testers to do everything wrong they
can think of to see what happens. Here’s how to uncover possible bugs in
your chatbot program:
• Try out your program with unexpected answers. If the chatbot doesn’t
respond in a way that makes sense, give it more answers to watch
for and more things to say. Use blocks like “and” or “join” from the
Operator menu (green) to add to the possibilities.
• The best way to improve a program designed for other people to use
is to get other people to test it for you! They will also give you ideas for
other fun things to add.
GO BEYOND
• Make your chatbot talk out loud!
• If your computer has a microphone, open the Sounds tab and record
yourself reading the chatbot’s answers. Your spoken answers
will become sound files that you can play instead of using written
speech.
• Put the person’s answers in a Text-to-Speech block and hear your
chatbot repeat the answers out loud. To find these blocks, click on
the extension symbol at the bottom of the Block Palette column
(bottom left of the screen). Choose the Text-to-Speech extension
and the blocks will be added to the column.
• Make your chatbot smarter. The Scratch Wiki contains instructions for a
chatbot that analyzes each word in a person’s answer separately. Check
it out at en.scratch-wiki.info/wiki/Creating_a_Chat_Bot.
• Try a Scratch-based AI activity to see how machines learn! The website
Machine Learning for Kids has some simple exercises to test out:
machinelearningforkids.co.uk.
Chapter 3: Robots That Think 83
Make_Simple_Robots_interior_FIN.indd 83Make_Simple_Robots_interior_FIN.indd 83 4/26/22 1:55 PM4/26/22 1:55 PM