← one-pagers

The Matchbox

A pile of fifteen matches, one rule, and a butler who keeps his whole education in fifteen matchboxes. Play him, or send him off to practise and watch the beads pile up where the good moves are.

The game. Fifteen matches. Take 1, 2 or 3 in turn. Whoever takes the last match loses.

The history. In 1961 Donald Michie, a British researcher in Edinburgh, wanted to show that a machine could learn a game from experience alone. He had no computer to hand, so he built one out of 304 matchboxes. Each box stood for a position in noughts and crosses and held coloured beads, one colour per possible move. To make a move you took the box matching the board, shook out one bead at random, and played that colour. If the machine lost, the beads it had played were thrown away. If it won, extra beads of those colours went in. After some hundreds of games the boxes were full of sensible moves and short of foolish ones. He called it MENACE, the Matchbox Educable Noughts And Crosses Engine.

The table
First move:
Practice

Clive plays a random opponent, learning after every game. Who moves first alternates.

Nothing practised yet.

Rolling win rate over the last 50 practice games. Dashed: the best any player can do against a random opponent. Dotted: a coin toss.

The matchboxes

One box for each pile size Clive can face on his turn. Each holds beads labelled with the number of matches to take; a bead is drawn in proportion to how many of its colour are in the box. A box marked used was drawn from in the current game.

What this is not. It is not Michie's machine. His played noughts and crosses with 304 boxes, paid three beads for a win and took one for a loss, and resigned if a box ran dry. Mine plays this one little game with fifteen boxes. A win adds one bead; a loss takes up to six from the colour played; no colour ever falls below a single bead, so no box can empty and resign. I flipped his pay scale because his learned noticeably slower on this game when I tried it. The principle is his. The adjustments are mine.

A note on solving. This game is small enough to solve on a napkin: hand your opponent a pile of 1, 5, 9 or 13 (one more than a multiple of four) and, played properly, they cannot win. Nobody tells the butler this. There is no strategy written down anywhere in the page; the boxes below simply are the memory. If the bead counts drift toward that rule, they got there by being punished for the alternative.

History: MENACE on Wikipedia. This page keeps its bead counts in your browser's local storage under clive-matchbox-v1 and nowhere else; nothing is sent anywhere. The brain link puts the counts in the address (#brain=…) so another browser can borrow them.