Skip to main content
### Number and algebra

### Geometry and measure

### Probability and statistics

### Working mathematically

### For younger learners

### Advanced mathematics

# Nim-like Games

### Common Nim

### Straight Nim

### Understanding Nim

There are many internet resources that will tell you how to win at Nim, but at NRICH we found them all to be rather unsatifactory. Sometimes it's not enough to know the secret of winning - and the curious amongst us want to know why it works and how it was discovered. With those thoughts in mind, we've developed an animation called 'Drips' that we hope will allow you to discover the secret for
yourself. It's still not totally straightforward so be prepared to dwell on the problem for some time. You will find the animation at https://nrich.maths.org/drips.

### Oddly

### Odd Line Up

### Odd Square

### Old Gold

## You may also like

### Nim

Or search by topic

Age 7 to 16

Challenge Level

- Game

This is a collection of games of skill for two players, both players have exactly the same information, chance plays no part, and each game must terminate. There is always a 'winning strategy' and all the moves can be analysed mathematically. The only advantage that either player can possibly have is to start or to play second. To work out how to win you need to start by analysing the 'end game', and the losing position to be avoided, and then work back to earlier moves. Can you find the winning strategies?

The rules are simple. Start with any number of counters in any number of piles. Two players take turns to remove any number of counters from a single pile. The loser is the player who takes the last counter.

The rules are the same as for Common Nim but, in this game, the winner is the player who takes the last counter.

This game always starts with an odd number of counters and they can be arranged in any number of piles. The players in turn take any number of counters from a single pile. The winner is the player who ends up with an odd number of counters. First try the game starting with three rows with 1, 3 and 5 counters and the rule that, when it is your turn, you can only take one, two or three counters from one of the rows. What if you change the game so it starts with more rows? What if you change the restrictions on the number of counters you are allowed to move? What if you have no restrictions except that in any one turn you can only take counters from one of the rows?

This is a simple version of Oddly. The game starts with an odd number of counters in a single line. Play this game with the rule that players take one, two or three counters at a time and the winner is again the player who ends up with an odd number of counters.

In this game the players may take a single counter or two adjacent counters and the winner is the player who ends up with an odd number of counters.

This game is played with a line of squares and a set of counters or coins. Only one coin has any value. The game starts with some empty squares and single coins in the other squares. Each player in turn may either move any one coin any number of empty spaces to the left, or take the coin on the extreme left. You cannot put two coins on one square or jump coins past each other. The winner is the player who takes the gold coin. You can play this game on a line of squares with any number of squares to the right but the left hand end is a cul-de-sac. As the coins can only move to the left sooner or later all the coins will be shifted to the left with no remaining spaces between them and someone will be able to take the gold coin and win the game.

Start with any number of counters in any number of piles. 2 players take it in turns to remove any number of counters from a single pile. The loser is the player who takes the last counter.