Posts Tagged ‘scratch’

The Scratch coordinate system

Tuesday, July 23rd, 2019

In Scratch 3, the stage in the top right where your sprites live is implemented as an HTML canvas. Unfortunately the internal coordinate system used by Scratch logically to maintain state, and the coordinate system used by HTML canvases both work very differently.

For some of the Scratch blocks I’ve written for Machine Learning for Kids, I need to be able to convert between coordinates and sizes between the two different coordinate systems.

For example, my ML blocks can let a student use an image classifier they’ve trained to recognise what is on the background behind a certain Sprite in their project. To do that, the backdrop image block needs to:

  1. get the location of the Sprite (which will be returned using the Scratch coordinate system)
  2. get the image data of what is rendered on the canvas at that location (using HTML canvas APIs – using the HTML coordinate system)

I couldn’t find a way to convert between the two documented anywhere, and it was a tiny bit fiddly, so I’m documenting it here for the next time I need it!

(more…)

How to increase your social impact

Sunday, June 16th, 2019

This is a talk I gave at an event about how we are able to make a social impact through volunteering and community projects.

I’ve written before about how I made Machine Learning for Kids. But this talk had a different focus.

For this presentation, I looked to see if there are any general lessons that could be learned from my experience, to let me offer a little advice for people working in large companies like IBM about how to increase the impact of their volunteering efforts.

(more…)

How to create a Twitter API proxy using nginx in Cloud Foundry

Sunday, November 18th, 2018

In this post, I’ll describe how to run nginx in Cloud Foundry to provide a Twitter API proxy that includes authentication and caching.

First, I want to talk a bit about why I wanted this, but if you don’t care about any of that, you can just skip to the code at the end of the post. 🙂

I’ve wanted for a while to enable projects in Machine Learning for Kids that use tweets. Using live tweets is a great way to make text analytics real for students, and a good example of how natural language processing is used in the real world.

The question was how to enable this from Scratch in a way that would be easy to use by schools.

The title of this post gives away the answer I ended up with, but I’ll describe why.

(more…)

Noughts and Crosses AI demo for Science Fair events

Monday, May 28th, 2018

A hands-on demo for use at a small STEM event – letting kids train a simple AI system by playing a few games of noughts and crosses.

I prepared an activity for a STEM event in London this week. The idea was to make something for a Science Fair sort of event – where children will be walking past a stand, and might stop for a minute or two to try out an activity.

The objective was to come up with a hands-on demo that would enable a volunteer to talk to the children about machine learning.

As I’ve written it, I thought I’d share it here in case anyone else might find it useful for another event.

Noughts and Crosses

It’s based on the noughts-and-crosses activity that I’ve used before. Kids play noughts-and-crosses against a simple artificial intelligence system. The computer uses a machine learning model to decide where to make it’s moves. And that machine learning model will be trained throughout the event using the moves from every game so far.

Download the instructions here

(more…)

Teaching artificial intelligence using Scratch

Friday, May 18th, 2018

This is a recording of a talk I did at DevoxxUK last week. Devoxx is a community developer event, run in London. I had 50 minutes to talk about what I’m doing with Machine Learning for Kids.

Groups like Code Club, CoderDojo, Code.org and many others are doing amazing work in helping to introduce kids to coding. Initiatives like Hour of Code have highlighted how those of us in tech can help to support and inspire the next generation of developers.

How can we extend this to include artificial intelligence and machine learning?

How can we use the cloud-based machine learning APIs that are increasingly available to us as developers to extend the tools used to teach kids about coding?

In this session, I’ll share the work I’ve been doing to introduce machine learning to kids, and demo the resources that are available to give kids hands-on experiences at training and using machine learning models for themselves.

If you’re familiar with AI and ML technologies, this session will hopefully enable you to share your expertise with local schools, colleges and coding groups.

If you’re not as familiar with ML, this session will show you how quick and simple cloud-based machine learning APIs are today, and perhaps inspire you to use them in your next project.

Scratch Day at IBM Hursley

Friday, May 18th, 2018

Scratch is a visual programming language and drag-and-drop coding platform for children.

scratch

Scratch Day is an annual world-wide network of events where kids come together to make things in Scratch.

Their logo sums it up beautifully:

logo

Kids of different ages come together and meet each other. They share their experiences of coding – finding out the differences between what they each learn about coding in their different schools.

They try and make something. It’s basically a hack day for kids – where the kids are encouraged to use Scratch to make their hacks.

Most importantly, they share their experiences. They talk about the things they tried, the challenges they faced, and the things they learned along the way. And they demo the things that worked.

On May 12th that happened around the world, in close to a thousand venues, big and small.

scratchdaymap

One of them was IBM Hursley. We invited local families to the lab to take part in a small local Scratch Day.

(more…)

Explaining crowd-sourcing in machine learning

Wednesday, January 31st, 2018

I pushed a new feature to Machine Learning for Kids last night: “class projects”. Now a whole class of students can work on a project together – all helping to train a shared, group machine learning model.

I’ll write some proper documentation for it, but in the meantime I thought I’d share a few quick thoughts on how this works and what it’s for.

(more…)

How I ended up making MachineLearningForKids

Sunday, October 29th, 2017

I write a lot about what I’m doing with machine learning for kids, but in this post, I want to share a little about how I ended up doing it and why.

I tend to write about *what* I’ve done. I rarely write how things happened though, or what made me do them. I just assume that people would be less interested in that.

But, if I think about what I find interesting, it tends to be the backstory to projects. To use Nick as an example, I’ve seen him give loads of talks about Node-RED. And I’ve enjoyed the ones where he talks about how Node-RED happened more than where he gives demos of what Node-RED is.

Inspired by that, I thought I should at least try to capture a few breadcrumbs for how I ended up where I am now with machinelearningforkids.co.uk.

(more…)