Hoard

Counters come off the hoard on your turn, and whoever takes the last of them wins. Which positions are already lost turns out to be governed by the golden ratio — a number nothing in the rules ever mentions.

How to play

There are two piles.

  1. Learn the small losing positions One and two. Three and five. Four and seven. Six and ten. Hand any of those over and your opponent is stuck.
  2. Equal piles are a gift If both piles match, whoever moves next simply takes the lot from both and wins. Never hand those over.
  3. Aim, do not react Every turn, work out which losing position you can reach. There is always exactly one from a winning position.
Full instructions

In depth

Beating a perfect opponent at the golden ratio coin game

How Hoard works, why the losing positions follow a pattern tied to the golden ratio, the small positions to memorise, and how to hand the machine a bad deal on every single turn.

Screenshot: How to play Hoard
How to play Hoard as it appears when the page opens.

Two piles and one rule

Two piles of coins sit in front of you. On your turn you take any number of coins from one pile, or the same number from both piles. You must take at least one. Whoever takes the last coin wins.

You go first. The machine never makes a mistake. If a winning move exists from the position you hand it, it will find it. The only way to win is to give it a position where every possible move leads to your advantage. Those positions have a name: they are the losing positions, and they are the key to the whole game.

What a losing position looks like

A position is losing for whoever has to move if every available move from it hands the other player a winning position. The simplest losing position is zero and zero. Whoever faces two empty piles has already lost because there are no coins left to take.

Working upwards from there, the losing positions are one and two, three and five, four and seven, six and ten, eight and thirteen, nine and fifteen, and so on. The order of the two piles does not matter. One and two is the same as two and one.

These pairs have a pattern. The first pair differs by one. The second pair differs by two. The third by three. The fourth by four. The k-th losing pair always differs by k. And every whole number appears in exactly one of these pairs, never two and never zero.

Where the golden ratio comes in

The golden ratio is the number 1.618 and a bit more, usually written with the Greek letter phi. It is irrational, meaning it cannot be expressed as a fraction of two whole numbers. It satisfies the equation where the square of phi equals phi plus one. It shows up in art, in plants, in spirals, in geometry, and, strangely, in this coin game.

Take the golden ratio and multiply it by one, two, three, four, and so on. Throw away the fractions each time. You get one, three, four, six, eight, nine. Those are the smaller halves of the losing pairs. Now do the same with the square of the golden ratio, which is 2.618 and a bit. You get two, five, seven, ten, thirteen, fifteen. Those are the larger halves.

Nothing in the rules mentions irrational numbers. The rule is just take from one pile or the same from both. Yet the answer is governed by a number that cannot be written as a fraction. This was published by Willem Wythoff in 1907 and it has surprised people ever since.

Controls and what you see

The two piles are shown as stacks of coins. To take from one pile, tap the coin you want to take down to. If a pile has eight coins and you tap the fifth from the bottom, you take three. The pile shrinks to five.

Below the piles, a row of numbered buttons lets you take the same number from both. If both piles have at least four coins, buttons for one, two, three, and four appear. Tapping the three button removes three from each pile at once.

The counters above the board show coins left, whose turn it is, and how many moves you have made. The machine responds after a short pause. A message under the board tells you what it did.

The three pile sizes

The Piles selector offers Small, Medium, and Large. Small draws from piles up to about twelve coins. Medium goes up to about eighteen. Large can reach twenty-six.

Larger piles mean more losing positions to keep track of. On small piles, you only need the first few pairs. On large piles, you might need to work out pairs like eleven and eighteen or fourteen and twenty-three. The arithmetic is always the same, but there is more of it.

Every starting position is chosen so that a winning move exists. The machine never puts you in a losing position at the start, so a loss always means a mistake somewhere in the middle.

How to find the right move

Look at the two pile sizes and find which losing pair you can reach. There is always exactly one from a winning position. Sometimes you take from the left pile, sometimes from the right, sometimes from both.

Say the piles are five and nine. The losing pairs you know are one and two, three and five, four and seven, six and ten. Can you reach any of them? Take four from the right pile and you get five and five. That is not a losing pair. Take four from both and you get one and five. Not a pair either. Take two from the right and you get five and seven. Not a pair. Take two from both and you get three and seven. Not a pair. Take four from the right to get five and five, then you realise the answer: take from the right to get five and three. Three and five is a losing pair. Hand that over.

With practice, you stop checking every option and start recognising the pairs by sight. The k-th pair differs by k, so the first thing to check is the gap between the two piles.

Equal piles are dangerous to give away

If both piles have the same number, whoever moves next can take them all from both piles in one move and win. Equal piles of any size are a winning position for the player about to move.

This means you should never hand the machine two piles of the same size. It will take the lot and the game is over. The only exception is zero and zero, but by then you have already lost. Even two and two, which looks safe, lets the machine take two from both and win instantly.

Watch for this when you are planning a move. If taking from one pile would leave both piles equal, find a different move.

Using the both option

Taking from both piles is what makes this game different from ordinary coin-taking puzzles. Without it, the game would split into two independent piles and the strategy would be completely different.

The both option is often the only way to reach a losing pair. If the piles are seven and twelve, the pair you want is four and seven. You need to remove three from the larger pile, which you can do by taking from the right pile alone. But if the piles are nine and fourteen, the pair you want is four and seven, and you need to remove five from each. Only the both option gets you there.

Do not ignore it. Players who only think about single-pile moves miss half the available positions.

Mistakes that hand the machine a win

  • Leaving equal piles. The machine takes both at once and wins on the spot.
  • Taking coins without checking which losing pair you are aiming for. Random moves feel active but they leave the machine a winning response almost every time.
  • Forgetting to consider the both option. The losing pair might only be reachable by taking from both piles, not from one.
  • Trying to memorise all losing pairs at once. Start with one and two, three and five, four and seven, six and ten. Those four pairs cover almost every small pile game. Add more as you move up in size.
  • Assuming the machine will slip. It never does. It plays perfectly from a table of every position. Every loss is your mistake, not its luck.
  • Rushing through moves without checking the gap. The k-th pair differs by k. If you see piles that differ by three, you know you are looking for the third pair, which is four and seven. Use the gap to narrow the search.

All the coins stay on your own device

The losing positions are computed right inside the page by working through every position from zero upwards. Nothing is sent to a server. There is no account, no login, and no data collection. Your best score is kept in your browser's local storage on this device only. The page works offline once loaded, because there was never anything on the other end to begin with.

Help

How to play Hoard

There are two piles. On your turn you take as many coins as you like from one pile, or the same number from both, by tapping the coin you want that pile to come down to. You always go first, and the machine never makes a mistake, so the only route through is to hand it a losing position on every single turn.

Learn the small losing positions

One and two. Three and five. Four and seven. Six and ten. Hand any of those over and your opponent is stuck.

Equal piles are a gift

If both piles match, whoever moves next simply takes the lot from both and wins. Never hand those over.

Aim, do not react

Every turn, work out which losing position you can reach. There is always exactly one from a winning position.

Notice the gaps

The differences go one, two, three, four… while the smaller numbers skip about. That is the golden ratio showing through.

Wythoff’s game and the golden ratio

Willem Wythoff published this game in 1907 with a remarkable observation. Work out the losing positions from the bottom up — a position loses if every move from it hands the opponent a winning one — and they come out as (1,2), (3,5), (4,7), (6,10), (8,13), (9,15) and so on. Now take the golden ratio, 1.618…, the number that satisfies φ² = φ + 1. Multiply it by 1, 2, 3, 4 and throw away the fractions: 1, 3, 4, 6, 8, 9. Those are the smaller halves. Multiply φ² by the same numbers and you get the larger halves. An irrational number, nowhere mentioned in the rules, describes the answer exactly. The underlying fact is Beatty’s theorem: for two irrationals whose reciprocals add to one, the two sequences of multiples between them hit every whole number exactly once. This game computes the losing positions by plain arithmetic and checks the golden-ratio formula against them rather than assuming it.

Good to know

Every number appears once

Across all the losing pairs, each whole number turns up in exactly one of them. That is what pins them down.

The kth pair differs by k

One and two differ by one; three and five by two; four and seven by three. Use it to find the next one.

Taking from both is the sharp move

It is what makes this different from ordinary coin-taking, and it is often the only move that reaches a losing position.

You always start able to win

The opening position is never a losing one, so a defeat means a mistake somewhere.

Common questions

Can I take from both piles by different amounts?
No. From both means the same number from each, which is the rule that makes this game what it is.
Must I take at least one coin?
Yes. Passing is not allowed, and there is always a move while coins remain.
Does the machine ever slip?
Never. It always hands back a losing position if one is available.
Can I win from any starting position?
From the ones you are given, yes — losing positions are never used as openings.
Where does the golden ratio come in?
It is not put in anywhere. It falls out of the rules, which is the surprising part.