This challenge has been written by Margareta Zajkova and is part of the EU CODE WEEK CHALLENGES.
Target Audience
  1. Teachers and educators
  2. Lower Secondary School students (12 to 16 years)
Experience
  1. Intermediate
Duration
  1. 1 hour
Purpose
  1. To learn basic concepts of machine learning and text recognition.
  2. To understand the role of emotions in communications.
  3. To use code to create dialogues between chatbot and a user.
  4. To understand how computers can recognize emotional tones through text analysis and respond accordingly.
Description
Create Emotional Bot in Scratch that can display happy face for positive messages (if you say nice things to it), an angry face for negative messages (if you say mean things to it) and confused face if the message is unspecified. Our Emobot Kliki will recognize compliments and insults so we will see how computers can be trained to recognize emotional tone.
Instructions
  • To get started, program a list of rules for what is nice or kind and what is bad or mean.
  • Log in to https://machinelearningforkids.co.uk/ or create a new account.
  • Make a new machine learning model adding 3 new labels, first call it “nice”, second bucket called “bad” and optional if you want to recognize your name, create third label called “name”.
  • Train the new machine learning model, test it and use it to make Emobot in Scratch.
  • Launch the Scratch 3 editor, delete the cat sprite, insert 3 new sprites made by Microsoft Bing Image Creator (happy, angry and not sure computer cartoon) or create a new sprite by clicking on the Paint icon by drawing three copies of the costume for happy, angry and not sure face.
  • Click the “Code” tab and enter the following script.
Share the link to your work in your Instagram Bio: tap the Edit Profile button on your Instagram and add the link to your work in the Website field. After that, create a new post, add a screenshot of your work, write “Link in Bio”, add the hashtag #EUCodeWeekChallenge and mention @CodeWeekEU.
Example
Share your Emobot Kliki with your friends and learn more about AI and emotions!
Instead of a computer cartoon you can try something different, like an animal. Instead of kind and mean you could train the character to recognize other types of messages.
Click here to download this challenge as a word document.