Algorithms to sort and classify shapes
Once you can classify shapes by their properties, you can teach a clear procedure to do it automatically. An algorithm is a precise sequence of steps and decisions that completes a task, and writing one to sort and classify shapes is a perfect way to make your geometric reasoning explicit. This year you learn to design and create such algorithms, and to describe clearly how they work.
Turning a classification into an algorithm forces you to be exact. A vague sense of what makes a square will not do; you have to spell out the precise questions, in the right order, that distinguish every shape from every other. This is the same kind of thinking that underlies all of computing.
Decisions as a tree
A natural way to design a classification algorithm is as a decision tree. You start with a question about an attribute, such as does this shape have four sides. Each answer, yes or no, sends the shape down a different branch, where the next question waits. A shape without four sides might be classified by counting its sides; a shape with four sides leads to further questions about its angles and side lengths. Following the branches from top to bottom always arrives at a single, correct category.
The power of the tree is that each question narrows the possibilities, so only a few well-chosen questions can distinguish many shapes. The order of the questions matters: asking about the number of sides first makes sense, because the later questions about right angles only apply once you know you are dealing with a quadrilateral. Designing the questions and their order is the creative heart of building the algorithm.
Writing and describing the steps
The same logic can be written as an ordered list of steps, some of which are decisions. Step one might be to count the sides; step two, if there are not four, to classify by side count and stop; step three, if there are four, to check the angles and sides; step four, to name the quadrilateral accordingly. Written this precisely, the algorithm could be followed by another person or carried out by a computer, with no guesswork.
Being able to describe how the algorithm works is as important as creating it. A clear explanation lets someone else follow the steps, check that the logic is correct, and suggest improvements, perhaps a shorter path or a question in a better order. This blend of geometric knowledge and step-by-step logical design is exactly the kind of computational thinking the curriculum is building, and it connects the shapes you classify by eye to the precise procedures that power software, sorting and searching of every kind.
Teaching tip: play a guess-the-shape game where the student may only ask yes or no questions about attributes. The questions they choose, and the order they ask them in, are an algorithm in the making. Afterwards, write the questions down as a decision tree together to see the algorithm take shape.
Emphasise precision and order. Ask what happens if a step is missed or two steps are swapped, so the student sees that an algorithm only works when every step is clear and correctly sequenced. Describing each step in plain words is the habit that makes algorithmic thinking reliable.
Running the algorithm in order
An algorithm is only useful if it can be carried out exactly, and the clearest way to see that is to run it one step at a time. Taking a single shape and answering each question in turn shows how every answer decides which question comes next, until the procedure reaches a conclusion. Tracing it slowly like this is also how you check that the steps really do lead to the right category.
Sorting a whole batch
The same fixed procedure that classifies one shape can sort an entire collection. Fed a list of shapes, the algorithm sends each one through its questions and drops it into the bin for its category, until every shape has been placed. This is the real value of writing the rule as an algorithm: it works the same way on the first shape and the hundredth, with no extra thought required.
Improving the algorithm
Two algorithms can give the same answers yet do different amounts of work. The order in which the questions are asked decides how quickly each shape reaches its result, so asking the question that rules out the most cases first tends to be more efficient. Comparing orderings, and choosing a better one, is part of designing an algorithm well, not just making one that happens to work.