Machine Learning with App Inventor

Main Idea

The scenario aims at introducing Artificial Intelligence, in particular Machine Learning. The scenario uses a free tool to train a machine, for example to recognize words to switch a light on and off. The classification algorithm is then used as an extension in App Inventor. In this environment, kids develop a simple app to simulate the voice control of a light bulb. 

CreatorJan Pawlowski, Idzik Martin
SubjectComputer Science
Length90 minutes
Pedagogical ApproachProblem based  learning
CompetencesProblem solving, new technologies, artificial intelligence, programming
GradesPrimary school, 5-6 grade
TechnologiesMachine Learning, App Inventor
Learning Activities

Contextualization

The teacher introduces basics of artificial intelligence and machine learning. Examples to be used could be typical AI applications, such as face recognition or chatbots. The following worksheet can be given to the students https://docs.google.com/document/d/1-UJhr3w4CGljuvbjt4Ocmk86ck5xwWP-UJ-eoCUdyQA/edit?usp=sharing

Elaboration

  • The students get introduced to machinelearningforkids where the tool is available online. They start to come up with possible expressions to be used when turning lights on and off. It should be made clear that there are many different ways to express this and the training should cover as many as possible expressions. Then, the algorithm is trained. The extension for app inventor is generated (using a pre-defined URL)
  • The teacher introduces basics of the App Inventor programming environment. The introduction should cover the differences of the design (user interface design for the smartphone) and blocks (to program the app) as well as the transfer to the smartphone using AI Companion.
  • The kids start App Inventor and start to create a design for the start screen – this includes the non-visible components (speech to text, machinelearning extension). 
  • The kids start to use the blocks to programm the app. This includes simple conditions (e.g. confidence of ML outcome), displaying text (the command and the confidence level) on the screen and changing a picture.
  • Now, the kids can try out the app

Reflection / Extension

The teacher moderates a short reflection:

  • What went well, what went wrong?
  • What can happen if the machine is trained in a wrong way or identifies wrong objects (or persons?)
  • The kids discuss which other tasks can be done using the ML tool and app (e.g. image recognition).

The following worksheet can be freely used and modified. To modify the worksheet, please make a copy in your google drive folder. Please do not forget to reference the COTA project when changing the material.

This document is distributed in 2021 by the COTA Project Consortium under an Attribution–ShareAlike Creative Commons license (CC BY-SA 4.0). This license allows you to remix, tweak, and build upon this work, as long as you credit the COTA Project Consortium and license your new creations under the identical terms

Published by Jan Pawlowski

Professor in Business Information Systems at Ruhr West University of Applied Sciences

Leave a Reply

Discover more from Computational Thinking and Acting

Subscribe now to keep reading and get access to the full archive.

Continue reading