Spatial algorithms: a week of ready-to-teach maths
Five lessons for Year 10 Space. Print this pack and the week is prepared: each day has a one-page plan and a student worksheet with practice and a stretch section, plus twelve step cards to match, twelve design, test and refine cards to sort, a mini-check and every answer with its working.
Start here: five minutes to Monday
- Skim the week at a glance on the next page.
- Print the five days. Each day is two A4 sheets: a plan and a worksheet.
- Print the two cut-out sheets, one copy per pair. Cut the 12 step cards before Day 1 and the 12 cycle cards before Day 2, and keep each set in an envelope.
- Computers with a spreadsheet, or with a block or turtle coding tool, help on Days 3 and 5; every task also works on paper.
- Open the free interactive unit on the board. Every plan says which picture to show and which buttons to press.
The idea in plain words
An algorithm is a list of steps precise enough that anyone, or any computer, carries them out the same way. Spatial problems, such as crossing a grid, drawing a shape or planning a route, can be solved with algorithms, but the first version is rarely the best: we design it, test it on examples, find where it fails or wastes effort, refine it and test again. A good solution comes with its justification, a clear reason why it works, and a short report that someone else could follow.
One day, one lesson
The five lessons fill a week of maths, one lesson of about 60 minutes a day. Run them in order: each day stands on the one before. Every plan marks a split point for two shorter sessions, and every worksheet ends with a stretch section for students who finish early.
How we write these
Grid cells are written (column, row) from the top-left cell (0, 0); the robot grid counts x across and y up. Turns are to the right and in degrees. City distances are counted in blocks along the streets, across plus up, never as the crow flies.
The week at a glance
One lesson a day for a week. Each day stands on the day before, so run them in order.
| Day | Lesson | Students learn and do | On screen |
|---|---|---|---|
| 1 | Precise steps | Rewrite vague instructions as precise steps, trace a robot program on a grid, and match six vague instructions to their precise versions | An algorithm is an ordered recipe; steps must be unambiguous |
| 2 | Test and refine | Trace a route rule on three grids, find where it gets stuck, refine it and test again on every grid, and sort twelve actions into design, test and refine | Test it by running it on an example; design, test, refine, repeat |
| 3 | Turtle shapes | Write loops that draw regular polygons and stars, find the turn from the number of sides, and justify why the turns add to 360° | An algorithm is an ordered recipe |
| 4 | Shorter routes | Plan a delivery round with the nearest-next rule, measure it in blocks, and refine it into a shorter round | A simple rule for a spatial task |
| 5 | Solve, justify, report | Find the meeting point with the least walking, first by testing points in a table and then by a faster rule, justify it, report it, and play the self-check quiz as a class game | Design, test, refine, repeat; self-check quiz as a class game |
How the week builds
Day 1 makes steps precise; Day 2 tests a rule until it breaks and refines it; Day 3 uses loops to draw shapes; Day 4 refines a route; and Day 5 runs the whole cycle and ends with a justified report. It builds on Year 9 work with algorithms and geometric reasoning, and it prepares the algorithmic thinking of senior mathematics and digital technologies.
Materials for the week (one trip)
- From the classroom: rulers, protractors, coloured pencils, scissors, envelopes for the cards, this pack printed.
- Cut-out sheet 1, one per pair: 12 step cards (Day 1).
- Cut-out sheet 2, one per pair: 12 cycle cards (Day 2).
- If you have them: computers with a spreadsheet or a turtle coding tool (Days 3 and 5). No other equipment to buy.
Words for the word wall
algorithm, step, instruction, condition, loop, repeat, trace, test case, design, refine, nearest-next, route, block distance, median, justify, report
Dear families
This week in maths, Year 10 is learning to solve problems about space and routes with algorithms: precise lists of steps that are designed, tested and improved, then explained to someone else.
Try this at home
- Ask: give me directions from the front door to your bed that a robot could follow exactly. Which words were too vague?
- Ask: what turn does a robot need, repeated 6 times, to draw a hexagon? (60°.)
- Ask: when you run errands, do you always go to the nearest shop next? Is that always the shortest trip?
- Ask: where should four friends meet so the total walking is least? (Ask again on Friday.)
My algorithms week
Fill one row a day. Write an everyday task, the first step of an algorithm for it, and one way it could go wrong.
| Day | A task | Its first step | How it could go wrong |
|---|---|---|---|
| Monday | |||
| Tuesday | |||
| Wednesday | |||
| Thursday | |||
| Friday |
Precise steps
An algorithm is a list of steps precise enough that everyone who follows it does exactly the same thing. Students rewrite vague instructions, trace a robot program on a grid, and match six vague instructions to their precise versions.
We are learning to
- say why an instruction is too vague to follow exactly,
- write steps with clear amounts, directions and stopping conditions,
- trace a program step by step and record where it ends.
Success criteria
- I can rewrite “walk a little way towards the door” so that everyone does the same thing.
- I can trace the robot program and give the robot’s final cell and direction.
You need
The step cards (cut-out sheet 1), one set per pair; the worksheet; a counter to act as the robot.
Lesson flow (about 60 minutes)
| 12 min | Robot teacher Show the board (see the box), then a student directs you to a desk while you follow every instruction exactly and literally. Ask: “Which instruction could I follow in two different ways?” |
| 28 min | Rewrite and trace Pairs complete Parts A and B, one reading the program while the other moves the counter. Ask: “After the robot turns, is “right” still the same way on the page?” |
| 20 min | Match the steps Pairs match the twelve step cards (Part C); early finishers do Part D. |
Two shorter sessions? Stop after Part A; start the next with Part B.
Watch for these ideas
- Words such as “a bit”, “nearly” or “about”: give an amount or a condition.
- Mixing up turns: left and right are the robot’s, not ours.
- Forgetting the start: an algorithm says where it begins and which way it faces.
Answers
- Part A: answers vary, such as “Walk 5 steps towards the door, then stop”; each needs an amount, a direction and an end.
- Part B: the robot passes (0, 1), (0, 2), (1, 2), (2, 2), (3, 2), (3, 1), (4, 1) and finishes at (4, 1) facing east.
- Part C: the card key is with the mini-check answers.
- Part D: Repeat 2 times: F F R F F F R (2 up, 3 across). The robot finishes at (0, 0) facing north.
Precise steps
A. Make it precise
Rewrite each instruction so that everyone who follows it does exactly the same thing.
B. Trace the robot
The robot starts at (0, 0) facing north. F moves it forward one cell; L and R turn it 90° left or right on the spot.
C. Match the steps
Match each vague card to its precise card. Write the letters.
| Pair 1: ______ and ______ | Pair 2: ______ and ______ |
| Pair 3: ______ and ______ | Pair 4: ______ and ______ |
| Pair 5: ______ and ______ | Pair 6: ______ and ______ |
D. Stretch: a loop
Test and refine
A rule is only as good as its tests. Students trace the rule “step right if you can, otherwise step down” on test grids, find where it gets stuck, refine it, and test the new rule on every grid again; then they sort twelve actions into design, test and refine.
We are learning to
- trace a rule on a test grid and record where it succeeds or gets stuck,
- refine a rule to fix a failure,
- test a refined rule again on every earlier test.
Success criteria
- I can show the cell where the right-first rule gets stuck on Grid 2, and why.
- I can explain why a refined rule must be tested on Grid 1 again.
You need
Coloured pencils; the cycle cards (cut-out sheet 2), one set per pair; the worksheet.
Lesson flow (about 60 minutes)
| 12 min | Run it Show the board (see the box). Ask: “The route reached the goal on this grid. Does that mean the rule always works?” |
| 28 min | Break it, fix it Pairs complete Parts A and B, tracing each route in a different colour. Ask: “Your new rule works on Grid 2. What must you check next?” |
| 20 min | Sort the cards Pairs sort the twelve cycle cards (Part C); early finishers do Part D. |
Two shorter sessions? Stop after Part A; start the next with Part B.
Watch for these ideas
- Testing on one easy grid only: choose tests that try to break the rule.
- Fixing one grid and breaking another: test every grid again.
- Trusting a route that looks right: trace it cell by cell.
Answers
- Part A: Grid 1 reaches the goal: (0, 0), (0, 1), (1, 1), (2, 1), (3, 1), (4, 1), (4, 2), (4, 3), (4, 4). Grid 2 gets stuck at (4, 1): the edge of the grid is to the right and the cell below is a wall.
- Part B: try down first, then right. Grid 2: (0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (1, 4), (2, 4), (3, 4), (4, 4). Retest Grid 1: it still reaches the goal.
- Part C: the card key is with the mini-check answers.
- Part D: right-first sticks at (4, 1) and down-first at (1, 4). One refinement: when stuck, mark that cell as a wall and start again; it marks (1, 4) then (0, 4), then goes (0, 0), (0, 1), (0, 2), (0, 3), (1, 3), (2, 3), (3, 3), (3, 4), (4, 4).
Test and refine
A. Test the rule
Start at the top-left cell (0, 0). Repeat until you reach the goal: If the cell to the right is open, step right; otherwise, if the cell below is open, step down. Cells are written (column, row).
B. Refine and test again
C. Sort the cards: design, test or refine?
| Design | Test | Refine |
|---|---|---|
D. Stretch: a harder grid
Turtle shapes
A loop repeats steps. A turtle that repeats “forward, then turn right” draws a regular polygon when the turn is 360° divided by the number of sides, and a star when its turns add to more than one full turn. Students write loops for polygons and stars and justify the turn.
We are learning to
- write a loop that draws a regular polygon,
- find the turn from the number of sides, and the interior angle from the turn,
- justify why a closed path turns through a whole number of full turns.
Success criteria
- I can write the loop that draws a regular hexagon.
- I can explain why the turn for a five-pointed star is 144°.
You need
Protractors and rulers; computers with a turtle or block coding tool if you have them; the worksheet.
Lesson flow (about 60 minutes)
| 12 min | Walk a square Show the board (see the box), then a student walks a square in the room, turning on the spot at each corner. Ask: “How far had you turned altogether when you faced your starting direction again?” |
| 28 min | Polygons Pairs complete Parts A and B, running the loops in a coding tool if there are computers. Ask: “Why is the hexagon’s turn 60° when its corners measure 120°?” |
| 20 min | Stars Pairs complete Part C; early finishers do Part D. |
Two shorter sessions? Stop after Part A; start the next with Part B.
Watch for these ideas
- Using the corner angle as the turn: the turn is 180° minus the corner.
- Stopping one side early: the loop runs once per side.
- Expecting any turn to close a shape: the turns must add to whole turns.
Answers
- Part A: 3 sides: 120°, 60°; 4 sides: 90°, 90°; 5 sides: 72°, 108°; 6 sides: 60°, 120°; 8 sides: 45°, 135°; 10 sides: 36°, 144°.
- Part B: repeat 6 times: forward 100, turn right 60°. The turtle faces its first direction again only after turning 360° in all, so n equal turns are each 360° ÷ n.
- Part C: 5 × 144° = 720°, two full turns, so the turtle faces its start again and the path closes; other stars vary.
- Part D: 2 × 360° ÷ 7 ≈ 102.86° or 3 × 360° ÷ 7 ≈ 154.29°, repeated 7 times.
Turtle shapes
A. Turn and corner
A turtle repeats: forward 100, then turn right by the same angle. Fill in the turn and the corner (interior) angle. The first row is done for you.
| Sides | Turn each time | Corner angle |
|---|---|---|
| 3 | 120° | 60° |
| 4 | ||
| 5 | ||
| 6 | ||
| 8 | ||
| 10 |
B. Write the loop
C. Stars
D. Stretch: seven points
Shorter routes
The nearest-next rule is quick to follow but not always shortest. Students plan a delivery round from a depot with the rule, measure it in blocks, then refine it into a shorter round and justify why it is shorter.
We are learning to
- follow the nearest-next rule and record the order of stops,
- measure a route in blocks along the streets,
- refine a route and justify the improvement.
Success criteria
- I can find the nearest-next round and its length in blocks.
- I can find a shorter round and explain where the saving comes from.
You need
Coloured pencils; the worksheet; a spreadsheet if pairs want to test many orders.
Lesson flow (about 60 minutes)
| 12 min | Nearest first Show the board (see the box). Ask: “If we always go to the closest stop next, what could go wrong at the end of the round?” |
| 28 min | Follow the rule Pairs complete Parts A and B, drawing the round in colour. Ask: “Which leg of the round is longest, and why does the rule end with it?” |
| 20 min | Beat it Pairs complete Part C; early finishers do Part D. |
Two shorter sessions? Stop after Part A; start the next with Part B.
Watch for these ideas
- Measuring as the crow flies: count blocks along the streets.
- Forgetting the trip back to the depot.
- Calling a round the best after one try: test other orders.
Answers
- Part A: A 4, B 13, C 5, D 8, E 5 blocks from the depot.
- Part B: Depot–A–E–C–D–B–Depot: 4 + 3 + 2 + 7 + 5 + 13 = 34 blocks.
- Part C: Depot–E–C–B–D–A–Depot: 5 + 2 + 8 + 5 + 4 + 4 = 28 blocks, 6 fewer. The rule left B, the farthest stop, for last and then needed 13 blocks to get home.
- Part D: 5 × 4 × 3 × 2 × 1 = 120 orders (60 if a round and its reverse count once). A spreadsheet can total them all; 28 blocks is the least.
Shorter routes
A. Blocks from the depot
A van leaves the depot, delivers to stops A to E and returns. Distances are counted in blocks along the streets: across plus up.
| Stop | A | B | C | D | E |
| Blocks from the depot | 4 |
B. The nearest-next round
C. Beat the rule
D. Stretch: how many rounds?
Solve, justify, report
Five friends want to meet at the street corner with the least total walking. Students test corners in a table (a spreadsheet can test every corner), refine the slow method into a fast rule, justify it, and report; then the self-check quiz as a class game.
We are learning to
- test candidate solutions systematically, by hand or with a spreadsheet,
- refine a slow method into a fast rule,
- justify a solution and report it so that someone else could check it.
Success criteria
- I can find the corner with the least total walking and show the totals that prove it.
- I can explain why the middle positions give the least walking.
You need
Calculators; computers with a spreadsheet if you have them; the worksheet; the self-check quiz on the board.
Lesson flow (about 60 minutes)
| 12 min | Where should we meet? Show the board (see the box), then pairs each mark a guess on the map. Ask: “Is the middle of the map the place with the least total walking? How could we find out for sure?” |
| 30 min | Test, refine, report Pairs complete Parts A to C. Ask: “Testing every corner works. What faster rule do the best corners share?” |
| 18 min | Quiz Play the self-check quiz as a class game; early finishers do Part D. |
Two shorter sessions? Stop after Part B; start the next with Part C.
Watch for these ideas
- Choosing the average: (4.6, 3.8) rounds to a corner that walks further.
- Leaving a friend out of a total: five distances every time.
- A report with no reasons: say how you know nothing beats it.
Answers
- Part A: (4, 4) 24, (5, 4) 23, (5, 3) 22, (6, 3) 23 blocks; the least is (5, 3), Cy’s corner.
- Part B: across 1, 2, 5, 7, 8 has middle 5; up 1, 2, 3, 6, 7 has middle 3. One block right of 5 adds a block for the three friends at or left of it and saves one for only two, so the total grows; the same holds every way.
- Part C: a report gives the method, the corner, the check against neighbouring corners and the middle-value reason.
- Part D: across 1, 2, 5, 7, 8, 9, up 1, 2, 3, 6, 7, 8: any corner from 5 to 7 across and 3 to 6 up walks the same least total.
Solve, justify, report
A. Test some corners
Five friends live at street corners. Walking is counted in blocks along the streets: across plus up. The first total is done for you.
| Meeting corner | (4, 4) | (5, 4) | (5, 3) | (6, 3) |
|---|---|---|---|---|
| Total walking | 24 |
B. A faster rule
C. Report
D. Stretch: a sixth friend
Vague steps and precise steps
For Day 1, one set per pair. Six cards give a vague instruction; six give a precise version of one of them. Match each pair.
Teacher note: the key is with the mini-check answers.
Design, test or refine?
For Day 2, one set per pair. Each card is one action from building a route rule. Sort the cards into three piles: design, test and refine.
Teacher note: the key is with the mini-check answers.
What we know: Spatial algorithms
Work on your own. Show your working.
- Rewrite this instruction so that everyone follows it the same way: “Walk a bit further down the corridor.” ______________________
- A robot starts at (0, 0) facing north and runs F R F F L F. Where does it finish, and which way does it face? ______________________
- On a 5 by 5 grid with walls at (2, 0), (1, 1), (4, 3), the rule “right if open, otherwise down” starts at (0, 0). Where does it get stuck? ______________________
- What turn does a turtle repeat to draw a regular octagon, and what is each corner angle? ______________________
- From a depot at (0, 0), stops sit at P (3, 1), Q (1, 4), R (5, 5), S (6, 2). Use the nearest-next rule, counting blocks, and give the length of the round. ______________________
- Testing a rule on one grid and reaching the goal shows that the rule, circle one: always works · is the fastest rule · works on that grid
- Houses stand along a straight road at 1, 2, 7, 9, 10 km. Where should a shared letterbox go for the least total walking, and why? ______________________
- What could go wrong with the step “repeat until you reach the goal”? How would you test for it? ______________________
How did this week feel? Circle one: I can teach it · I am getting there · I need more help
Answers and marking guide
Answers with working
- Answers vary, such as “Walk 10 steps further down the corridor, then stop.” It needs an amount and an end.
- At (2, 2) facing north.
- At (1, 0): the cell to the right and the cell below are both walls.
- 45° each time; each corner is 180° − 45° = 135°.
- Depot–P–S–R–Q–Depot: 4 + 4 + 4 + 5 + 5 = 22 blocks.
- It shows the rule works on that grid; other grids need their own tests.
- At 7 km, the middle house: the total is 16 km, and moving either way adds walking for more houses than it saves.
- The goal might never be reached, so the loop never ends or gets stuck. Test it on a grid where the goal is walled off, and add a stopping rule.
A quick three-level guide
| Idea | Working towards | At standard | Beyond |
|---|---|---|---|
| Precise steps | Uses words such as a bit or nearly | Writes steps with amounts, directions and an end | Uses loops and conditions so the steps work in every case |
| Testing | Tries one easy case | Traces a rule cell by cell and records where it fails | Chooses tests designed to break a rule |
| Refining | Fixes one case and stops | Refines a rule and tests it again on every earlier case | Refines a slow method into a fast rule and explains the gain |
| Justifying | States an answer without a reason | Shows totals or traces that support a solution | Explains why no other solution does better and reports it clearly |
Eight questions, four ideas. A student at standard writes steps anyone can follow, tests them, and backs every answer with a trace or a total.
Card keys
Step cards (Day 1): G with A; D with J; E with L; B with H; K with F; I with C. Cycle cards (Day 2): design: N, Q, S, W; test: M, P, R, U, X; refine: O, T, V.
Weekly class record
Jot a tick as you move around the room; the mini-check fills any gaps. A tick a day is plenty.
| Name | Steps | Test, refine | Turtle | Routes | Report |
|---|---|---|---|---|---|
The five columns are the five days: precise steps, testing and refining, turtle shapes, routes, and the report.