Micro Challenge #11 – Thinking like a computer

29 April 2020 - 3 minute read

Welcome to the eleventh of Altitude Foundation’s #MicroChallenges2020

Today’s challenge is to instruct a machine how to draw a house, a tree or a person.

What’s a Micro Challenge?

These challenges are short activities to help you develop, revise or refresh your coding skills, posted every Monday, Wednesday and Friday.

Micro Challenge #11

This week, our focus is on concepts in programming. 

How to “think” like a computer

It is important to remember that computers don’t actually think; what they do is follow a very clear set of instructions. However, computers can be “taught” – or rather, they can be instructed to recognise key patterns and features. 

For example, you might programme a computer to recognise cats. 

  1. You might do this by breaking down or ‘decomposing’ several cats into key features: they have four legs, a tail, pointy ears, whiskers; 
  2. By identifying shared factors, you have used pattern recognition; 
  3. By disregarding other factors (such as colour, fur length, size) you have used abstraction to identify the shared and therefore relevant features. 

You can now programme the computer to recognise these patterns and identify cats. 

The challenge

Your challenge today is to write an algorithm which tells a machine how to draw one of the following: a house; a tree; a person. [For the purpose of this exercise, imagine a child’s drawing – you don’t need to create an algorithm that will create a Turner painting] 

Remember: you will need to identify what features are necessary to make something recognisably a house/tree/person and which features might vary.

Here’s a basic example using a triangle:

— Start

— Draw a line (line 1) from tip a to tip b

— Draw another line (line 2) from tip b to tip c.

— From tip c of line 2 draw a third line (line 3) which meets tip a.

— Stop

Notice that this code does not specify length of the line or the angle of the triangle. 

Review it:

Could someone else follow your instructions to draw your chosen object? One way of testing this is giving them the instructions without telling them what they are for. You could do this with a parent-carer, sibling or a friend over the phone/internet. 

Advanced: 

Can you create a table which shows what information you got from the decomposition, pattern recognition and abstraction stages? If you want to further review those terms, you can do so on BBC Bitesize. 

Share it

We would love to see what you have created! Please send any pictures, videos, or files of your activities to us – either via Facebook, Twitter or Instagram  using #MicroChallenges2020 or to challenges@altitudefoundation.org. If you are emailing them to us, please let us know if you are happy for us to share your stuff on our social media platforms (with credit, of course).

Sign-up here to receive a weekly email with Micro Challenges top tips and solutions:



Leave a comment

Leave a Reply