All about algorithms

Computational Thinking - Alien Contact! - Lesson 6

Objectives

  • To give precise, unambiguous instructions in an algorithm.
  • To detect and correct errors in algorithms.
  • To recognise and apply computational thinking concepts and approaches to solve problems.

Lesson Resources

Introduction

Begin by sharing the final message from the aliens.

 

 

The challenges in this final week will test the students’ ability to create algorithms, give clear, unambiguous instructions, sequence instructions correctly and debug steps in an algorithm if mistakes have been made. 

Start by asking the students what is an algorithm? This is a series of rules or instructions that explain how to solve a problem. 

Barrier games are activities in which two or more people are working to achieve the same result without being able to see each other’s work.

A physical barrier (e.g. a screen or big book) is placed between two people so that they cannot see what the other is doing. This removes any visual clues and the success of the activity relies on good verbal communication. If you do not have resources to create enough screens, children can sit back to back with their paper/book on their lap.

One person is the “Speaker” the other person is the “Listener”.  The Speaker gives instructions for the Listener to follow.  Success happens when the Listener achieves the desired end product. 

 

Whole class challenge

As a demonstration, take on the role of speaker and explain that they will all be listeners. They all need some paper and something to draw with. Tell them to try and rely only on your instructions, keep your work covered and don’t look at what other people are doing.

Describe this image to them step-by-step, making sure they cannot see the image at any time. 

 

 

You can use these instructions or try your own. Try not to expand on any of the instructions to begin with:

  1. Draw a large square in the centre of your page. 
  2. Divide the square in half with a vertical line down the centre from top to bottom.
  3. Divide the square in half with a horizontal line across the centre from left to right.
  4. You should now have a square that is divided into four equal quarters. 
  5. You are now going to draw a shape in the centre of each quarter, each shape should be the same size; approximately a third of the width and height of the box it is in. 
  6. In the top left quarter, draw an equilateral triangle, pointing upwards, in the centre of the box. 
  7. Colour the triangle yellow.
  8. In the top right quarter, draw a circle in the centre of the box. It should be horizontally in line with the triangle and be a similar size. 
  9. Colour the circle blue.
  10. In the bottom left quarter, draw a hexagon in the centre of the box. It should be vertically in line with the triangle and be a similar size. 
  11. Colour the hexagon green.
  12. In the bottom right quarter, draw a square in the centre of the box. It should be vertically in line with the circle and horizontally in line with the hexagon and a similar size to all the other shapes. 
  13. Colour the square red.
  14. The drawing is complete. 

 

Show the class your version of the drawing (in the teacher presentation) and ask them to compare their own drawing to it. Ask the class:

  • Is it the same?
  • Were the instructions good?
  • Why/why not?
  • If you had any problems what were they? 
  • What sort of words did I use in my instructions?

 

Vocabulary is probably the most likely thing to cause problems. Words such as horizontal, vertical, thirds may all cause misunderstandings. 

Explain to the students that they are now going to have a go at some barrier exercises in pairs. 

 

Main task

You can have a mix of options for this task. Students can use drawings or patterns such as the whole class example, or physical objects such as construction blocks like LEGO or Multilink, or anything else you have in your classroom. As stated above, you can use physical barriers or sit the children back to back. 

 

Part 1.

Drawings or patterns:

  • Partner A is the speaker and needs a copy of the barrier games worksheet and some felt tips or pencil crayons. 
  • Partner B is the listener and needs plain paper and felt tips or pencil crayons. 

 

The speaker draws a picture or pattern on the left hand side of the sheet. Encourage them to keep it simple as they’ll need to be able to describe it! Make sure they keep it secret too. 

The speaker then explains how to draw their picture one step at a time. They should write down their instructions on the right of the sheet as they give them. The listener should just follow the instructions, no questions allowed. 

At the end compare pictures with your partner and go through the instructions you gave together. Did the pictures match? Were the instructions in your algorithm precise? Can you debug where any errors were made and improve the instructions as a pair?

Together they should edit and improve the instructions that partner A wrote down.  

 

Construction bricks:

  • Partner A is the speaker and needs a copy of the barrier games worksheet and 5/6 building bricks. 
  • Partner B is the listener and needs exactly the same bricks as their partner.

 

The speaker creates a simple model with the blocks, for example:

 

 

The speaker then explains how to build the model they have in front of them. They should write down their instructions on the right of the sheet as they give them. The listener should just follow the instructions, no questions allowed. 

At the end compare models with your partner and go through the instructions you gave together.

  • Did the models match?
  • Were the instructions in your algorithm precise?
  • Can you debug where any errors were made and improve the instructions as a pair?

Together they should edit and improve the instructions that partner A wrote down. They might also want to quickly draw the pattern of blocks on the left of the page. 

 

Part 2

When they think they have a bug free algorithm for drawing the picture or building the model, try it out with another pair. Again, it is really important that they keep the model or picture hidden, so not a pair they have been working close to. 

This time pair 1 can both be the “speakers”, taking it in turn to read out the instructions. Pair 2 can both draw the picture or build the model, based on the instructions (without looking at each other’s work). 

At the end, compare pictures/models from both of the children in pair 2 with pair 1’s design. Did the pictures/models match? Were the instructions in your algorithm precise? Was there an improvement based on the revised instructions? Are there any other factors that might affect the result? 

If time, swap so pair 2 are the speakers and pair 1 are the listeners and repeat. 

 

Plenary

Take a final look at the computational thinking poster with the class. 

 

 

Ask the class:

  • Which of these concepts do you think you have covered today?
  • Which of the approaches did you use?
  • Were you able to improve your algorithms?
  • How did you do this?

 

Then consider their progress over the weeks of this unit:

  • Do you think you have improved as a computational thinker over the weeks?
  • Have you covered all the different concepts at some point?
  • Which do you find most difficult?
  • Which approaches do you feel strongest with? 

 

It’s now time to unlock the final code number. Go back to the image you described in your algorithm earlier. Can you find the final number in this image?  

 

 

This final puzzle mirrors their first puzzle in lesson one. The answer lies in the number of sides of the shapes, giving the answer 3164. Then upload their final code to the aliens here:

https://scratch.mit.edu/projects/263204211/#fullscreen