Skip to content
the grown-up commonsPlay togetherBack to room

← Learn

What the Snack Machine Knows

Three short lessons on the maths inside a snack machine: the one number it remembers, why largest-coin-first change works for coins and not for every token, and how much to stock when nobody knows the demand.

For grown-ups, from what CodeRealm teaches children at Spark & Anvil.

  1. Lesson 1The machine remembers one number
  2. Lesson 2Largest coin first
  3. Lesson 3Stocking under uncertainty
At the table · Two to four, ages 6 and up

The shoebox machine

You'll need: A shoebox, a handful of coins, a card for the state, a few wrapped snacks or tokens as the goods.

  1. One player is the machine. Write the price on the box and keep the money-so-far on the card, starting at 0.
  2. The others put in one coin at a time. The machine updates the card, and refuses any coin that would go past the price.
  3. When the card equals the price, hand over the snack and reset the card to 0. Then change the coins the machine takes, and find a price nobody can reach.
  4. Swap who is the machine. Talk about what the card is: the only thing the machine knows.
Where the numbers came from

A little history, and what nobody knows

The first machine

The first known vending machine was described by Hero of Alexandria in the first century AD: a coin dropped in released a measured amount of holy water.

Whether his machine was ever built and used in a temple is not known.

Source: Vending machine (Wikipedia)

Say it at dinner · what a step can and cannot reach

The same idea, with the world taken away

You start at zero and may only add fours. Can you ever land on exactly ten? Which numbers can you never reach?

Ask it, then let everyone say the answer in their own words. A child's rung on Spark & Anvil ends the same way, with the world gone and the numbers left.

Your child's ladder · on Spark & Anvil

The same idea at every age

  1. Ages 3–5One Coin, One Snack
  2. Ages 6–8Exact Change Only and 1 more
  3. Ages 9–14The Machine’s Memory and 2 more
  4. Ages 15–18Stock the Slot and 2 more

Your child will meet this idea again at every age. The tools and courses here are the part for you.

Everything for a child who loves snack machines →

Print the guidebook (all lessons + the table activity) →