I recently ran a workshop on algorithms in the school where I am a governor (Bewdley Primary School) for a more able group of upper Key Stage 2 pupils (aged 9-11) from three of our four local primaries. This was in many ways the follow up to a workshop I ran last year which was hugely successful although a lot more academic. This post is to explain what I did and share the resources I developed for anyone wanting to repeat my workshop.
The structure of the day was:
9.00 Introduction
9.10 Stompy Zombie Robots
9.40 Use words to make instructions
9.55 Instruction game
10.05 break
10.20 Intro to scratch + guided project. Predict & make more
12.30 lunch
1.30 start with samples + make whatever
2.30 end
We stared in the school hall with a bit of housekeeping then introduced an algorithm as a set of instructions to carry out a procedure or solve a problem. We talked a little about how computers programs are just a series of simple instructions. Then we went on to play Stompy Zombie Robots.
Stompy Zombie Robots
This comes from the Computing at School Network of Excellence.
- Pupils divide in to threes and nominate one of the group to be the Stompy Zombie Robot
- The Robot is given a scrunched up tissue as ammunition
- Two teams face each other at opposite ends of the room with the Robots facing each other
- The two non-robot pupils on one team can give a single command which can be “Forward X steps”, “Turn X degrees” or “Fire!”. These are the only options.
- After each command the team notes the instruction as part of the algorithm and the other team takes a turn
- If the tissue hits the other robot then the firing team wins but if they miss then they cannot reload – only try to avoid being hit.
- If both teams miss with the tissue it is a draw.
- Rotate teams so they have a few goes
- Now introduce that the teams can create one secret extra command which can do whatever they like but must be a single instruction (and not hurt anyone etc)
- Let the teams have a few goes at this
We followed this excellent game of Stompie Zombie Robots by distributing a series of algorithm words (while,if,until,repeat,true,false), one to each group of three and asking the pupils to write an instruction sentence that included this word. Various amusing sentences followed. We then moved the words around a few times until each group had made a few different instruction sentences.
Finally, for this session, we played a game where a condition and an outcome were given like “If you are a girl clap your hands”, “If you are a boy sit down”, “If you are in year 6 jump in the air”, “If your teacher is the best give them a round of applause” etc. This was good fun and predictably chaotic.
After break we assembled in the computer suite and got everyone to open Scratch on their computer. Scratch is a fantastic piece of software from MIT and can be downloaded for free from http://scratch.mit.edu/. I gave an introduction to the Scratch interface and how it works broadly. Then I put on screen an image of a Scratch script and challenged the pupils to predict what would happen when I pressed the green flag. This was that the cat sprite would walk to the edge of the screen, stop, and a meow sound would play. They were pretty much all correct.
Next, we added a beach-ball and altered the script a little to introduce the process of adding a second sprite and that each sprite has its own scripts. We repeated the questioning of predictions and then introduced the idea of a reset instruction to return the cat sprite to the start coordinate at the start of the script. We also talked about x-y coordinates. Now, we added a script to the ball that made it move when the cat touched it. The final step was to point out that the ball just bounces back and forwards in a line and challenge the pupils to make the ball move in a more interesting path. After a couple of minutes a few solutions were given, all of which were fine.
Now, we set out four different starter projects with graded difficulty for the children to try to recreate. The simplest drew a pattern like a spirograph, the second (and by far the most popular) was a car racing game, the third was Hook-a-Duck (more complex because there were two sprites and the coordinates used depend on the pupils created artwork) and fourth and hardest was a trampoline and ball game where the angle of reflection of the bouncing ball depends on the offset of two sprites. Pretty much all the children did all four in the end with a few customisations here and there.
After lunch the final part of the day was free to create a Scratch project of their choice and some great ideas came out before wrapping up with a reminder about algorithms just being a set of instructions. The pupils learned a lot about how to use Scratch, how to think in small concise steps and how to structure a simple script as well as having a load of fun.
For anyone wanting to repeat this workshop the resources I used, teacher notes and complete challenge projects are downloadable HERE.