Monday, September 08, 2025

Machine learning for kids (Dale Lane site)

Web site: https://machinelearningforkids.co.uk/#!/welcome

What, why and who

Machine Learning for Kids (MLK) is the name of an AI project based education program developed by Dale Lane. He does continually update it since its inception in 2017. In this fascinating blog post Dale writes about how things happened and what made him do them.

Machine Learning (ML) is one type of AI. I’ll explain at the end how it fits into the bigger AI picture.

Dale has integrated his ML tools as Scratch extensions to provide an easy to use interface and kid friendly experience. Find this Scratch fork at https://machinelearningforkids.co.uk/scratch/. This is a great idea to help kids learn AI by making (actually training not making the whole thing, which is beyond the scope of kids) an AI in a familiar User Interface. This fits well with the constructionist learning concept that we understand a thing by (in this case partially) making that thing.

Project templates page of Dale's Scratch fork

On his About page Dale provides a What? and Why? he did it.

What?

“It provides an easy-to-use guided environment for training machine learning models to: recognise text, numbers, images, sounds; predict numbers; generate text.”
Why?
“Machine learning is all around us. We all use machine learning systems every day - such as spam filters, recommendation engines, language translation services, chatbots and digital assistants, search engines, and fraud detection systems."

It will soon be normal for machine learning systems to drive our cars, and help doctors to diagnose and treat our illnesses.

It's important that kids are aware of how our world works. The best way to understand the capabilities and implications is to be able to build with this technology for themselves.”

On the same About page find two videos:

Education in the age of AI (Artificial Intelligence) | Dale Lane | TEDxWinchester, 16 min (2023)
This one is an overview of the What? When? and How? explaining the importance of teaching AI in schools.

Machine Learning for Kids (2019), 22 min
This one takes you through the Smart classroom project where the program learns to recognise a variety of commands that turn a fan or lamp on or off. The program is first trained by the students and learns to recognise other commands which have not been in the training set.

Who?

Dale is an IT professional who works for IBM and has been involved in their development of watsonx, a further development of the famous watson which won Jeopardy in 2011, a significant milestone in the history of AI: https://en.wikipedia.org/wiki/IBM_Watson

The Projects and Worksheets

Dale has developed a comprehensive series of worksheets which take you through step by step about how to complete a project. All worksheets are released under the Creative Commons Licence :-)

The worksheets are categorised under project types (recognise text, images, numbers, sounds, faces; predict number or generate text), difficulty leval and whether they are Scratch or Python projects. At this stage I’ve completed about 20 projects (out of 52). Usually, but not always, they run smoothly and produce fascinating outcomes.

Examples which I have completed so far

For more detail go to the worksheets page:
recognise text: Smart Classroom, Make me Happy, Quiz Show recognise images: Judge a Book, I Spy, Shy Panda, CAPTCHA
recognise numbers: Pac-Man, Noughts and Crosses
predict numbers: Catch the Ball
recognise sounds: Alien sounds, Shoebox
recognise faces: Face Finder
generate text: Language models, Story Teller

70 years of AI

Working and reflecting through the projects became part of my own education about AI, how it works and how accessible it is to a curious non expert such as myself. We now live in a world of big data and machine learning pretrained models that do useful things.

The main thing we hear about these days is the hype and commercialisation around Large Language Models (LLMs). However, AI has been around for almost 70 years now and most of it has been in niche fields. This is where Dale’s site is so valuable. It provides an evolutionary, historical perspective. He has developed a bunch of fun games and activities around the media themes listed above (recognise text, images etc). For example, we can train a model to play Pacman by playing Pacman ourselves. As we play, the model tracks the co-ordinates of the player and the ghost and learns to play by itself.

By the way, Dale has also kept up to date with recent developments and as noted above has models that generate text, similar to chatGPT etc. but with a difference. As well as the commercial LLMs out there there are also many Small Language Models (SLMs) that don’t require such powerful (GPU) processors.

Story Teller: Of course I had to try the Small Language Model activity since that is currently in favour. I learnt that there are several Small Language Models out there a range of which are made available at the site, eg. “SmolLM2” (made by Hugging Face), Llama 3.2 (made by Meta) and there are others. I learnt that you can play around with the probability and temperature settings and how that affects the responses to a prompt. Each time you trigger a given prompt you will get a different story. I had a lot of fun with this one putting in characters I knew and suggesting a general story line.
Aside: What will English teachers set for homework from now on? Given that the model generates a different story each time I think the plagiarism checkers have had their day.

Workflow

The workflow can vary. Sometimes you go straight to a Scratch project page. Sometimes you start a new project. Sometimes you load a project template. It’s all laid out in the worksheets for each project.

Most of the projects have this screen in common. This particular one is for the Smart Classroom project, where you train the Scratch app to turn a light or fan on or off with text commands.

Train mode: You add a diverse variety of text instructions to category boxes: lamp_on, lamp_off etc. This can be arduous and I would anticipate some students saying “boring” for this mode.

Learn and Test mode: This screen reminds you of how many items you have entered into each category box and invites you to train a new machine learning model. After you train it you can then do some confidence testing (reported as a %) on new instructions which differ from the training set.

Make mode: This screen transitions you normally to Scratch 3 (or occasionally to Python or App Inventor) where you can load a Project template and test the model in an activity or game.

Models and Templates everywhere

I became interested in all the non commercial free AI models out there. They are everywhere and Dale has done a great job of finding and using them to generate a rich set of activities. Some examples to show the diversity of models used:
a model which uses data from wikipedia to develop a Quiz game
Use IBM® watsonx™ Assistant to build your own live chatbot
use the OpenLibrary API to enable access to information about books
and much more ...

This passage from one of Dale’s blog provides the big picture view of what he has achieved:

“Most of the work I do on Machine Learning for Kids involves adding machine learning models into Scratch. To enable students to create interesting projects, it also helps to make it easier to get external data into Scratch that they can use for training and classifying. A few examples of where I’ve done this in the past include creating Scratch blocks to access weather data, data from Spotify, and data from Wikipedia.”
https://dalelane.co.uk/blog/?p=5244
Pretrained models

Going back to the MLK Scratch site, if you open the Extensions page you find a variety of pretrained models. While for some of the projects students train their own models (aka supervised training, so they get to learn what is involved in training a model) it’s also a good idea to have pretrained models so the students can quickly move onto the more interesting aspects of ML. My abbreviated descriptors of the pre trained models below gives you some idea of the wide scope of possible narrow AI apps that has developed over time. I feel that all the hype surrounding LLMs tends to obscure this.

Some of the pretrained models on the Scratch Extensions page

There are pretrained models for:
Speech to Text: Google Chrome only
Face detection: find the x,y coordinates of your eyes, nose and mouth.
Pose detection: find the x,y coordinates of different parts of your body, like shoulders, elbows, wrists, knees, and ankles.
Hand detection: find the x,y coordinates of different parts of your hand: the tips of each of your fingers, and your wrist.
Toxicity: predict the percentage probability that some provided text contains toxic content such as threatening language, insults, obscenities, or identity-based hate.
Imagenet: will predict the main object shown in a sprite … (based on MobileNet (a ML model designed for mobile devices, so it doesn't need much computing power, more details here)
Question answering: It is a type of machine learning model called BERT which is useful for projects with text ... It has been trained using a set of questions and answers from Wikipedia articles collected by Stanford University called 'SQuAD'.
Pitch estimation: gives you blocks that will return the frequency of a note it recognized, and to convert that into the name or MIDI note

There is even a TensorFlow model for more advanced use. So Dale Lane’s site leads into more advanced aspects of AI. He doesn’t leave that out just because it is focused on kids.

There are more models at Scratch > Extensions including Wikipedia, Weather, Books, Voice tuner and MQTT

And then at the Scratch Project templates tab you will find another multitude under the categories: Text, Images, Numbers, Sounds, Regression

Stories and Learning Outcomes

Under the stories tab Dale uses stories to illustrate what students will learn from his program. For example:

Machine learning hasn’t replaced the need to code
Students see that machine learning adds new tools to their existing toolbox. They see that what they've been learning about coding is still important and valuable, and that machine learning expands the types of things they're able to build. This is followed by a story which illustrates this principle.
Crowd sourcing and gamification can help to generate training data

The boring side of AI is having to type in all the training data yourself. To overcome this problem Dale has developed some projects where the whole class does the training data.

There are many other story lessons listed here. You could read as “learning outcomes” from completing the projects.

Problems

Entering data can be arduous (boring), this varies from project to project depending on the type of data you need to enter.

One of the projects (Quiz Show) required too much memory for my computer

Some of the projects (eg. Shoebox) were flakey in that I would say one number clearly and two numbers were entered into the dialog. But the general issue of often requiring more data / training is not so much a problem but an opportunity to explain to students that ML works better with more training.

Practicalities

There are guidelines for teachers on this page.
I’d have to see how that pans out in practice:
setting up student IDs quickly
site reliability
ability to keep track of student progress

ML as one type of AI

ML is a subset of AI. I have previously blogged about this:

an AI taxonomy

This diagram, found on the web, is missing the two robotic forms of AI and the Neuro-Symbolic hybrids

ML is learning by example. In some cases lots of examples. It improves its performance with training over time. With machine learning, we use algorithms that have the ability to learn.

You can have forms of AI that don’t learn over time. Symbolic AI, Traditional robotics and Behaviour based robotics could all fit this category. They are programmed, they do some human like stuff but don’t change or improve over time without human reprogramming. They are still important but sidelined at the moment due to the LLM (Large Language Models) hype.

To repeat, Machine Learning is a subfield of AI that uses algorithms trained on data to produce adaptable models that can perform a variety of complex tasks. Deep learning is a subset of machine learning that uses several layers within neural networks to do some of the most complex ML tasks

So we have here with Dale Lane's site an introduction of one type of AI, the type that has received the most attention lately.