Gameweave

Nim

Nim is one of the oldest take-away games, played with matches, coins or pebbles on any table. This is the misère version a pub plays: the player left to take the last match loses.

Setup

Three rows of matches are laid out: 3 in the first row, 5 in the second and 7 in the third.

Play

Players take turns. On your turn, choose one row and take any number of matches from it, at least one and up to the whole row. You may only take from one row per turn.

Winning

Whoever takes the last match on the table loses, and the other player wins. There are no draws.

Strategy

Write each row's count in binary and add the columns without carrying. In the ordinary game you want to leave that sum at zero. In this misère game, play the same way until your move would leave only rows of one match, then leave an odd number of them instead.