# Nim-7

This is a basic form of the ancient game of Nim.

You will need seven objects, such as counters or blocks. It is a game for two players.

Watch the video below to find out how to play:

If you cannot access the video, click below to read the rules.

Place the seven counters in a line and decide who will go first. (In the next game, the other player will have the first turn!)

Each player takes it in turns to take away either one counter or two counters.

The player who takes the last counter (or counters) wins.

Play several times so that you get a good 'feel' for the game.

Are there any points in the game, before the end, when you know who the winner is going to be? How do you know?

Can you find a way to play so that you are sure you will win right from the start?

Does it matter who has the first turn? Why or why not?

Once you are an expert at this game, you may like to try playing Daisy, which is another Nim-like game.

Printable NRICH Roadshow resource.

What happens when there are three counters left?

We had some great ideas sent in for this task, so thank you to everybody who sent us their solutions.

Lots of children noticed that if there are three counters left at the beginning of your go, you can't win. Josh, Arthur and Mia from Kirkby on Bain in the UK said:

We have noticed that when there are three counters left no matter what the next player takes, the other player will win. This is because there will be one left if two are taken, and two left if one is taken. So the other player will win!

Josh, Arthur and Mia then explained how the first player could win:

Player 1 should take one counter as their first go. This means they will get to leave three counters after their second go and then win. We are going to try with 9 counters!

Thank you for sending in these ideas. I wonder what the best strategy for winning is with nine counters?

We also had lots of ideas sent in from the children at St Charles Primary School Ryde in Australia. Samuel suggested that if there are seven counters left, you should take one counter so that there are six left. Can you definitely win if you leave six counters for the other player? Why?

The children from Olga Primary School in the UK sent in lots of videos explaining their ideas. Francis and Caitlin explained why leaving three counters for the other player is a winning strategy:

Ben and Ayaan explained why going first means you can always win:

Thank you all for sending in your thoughts about this game!

Thank you as well to Eloan and Ella from Clifton College Prep School in England, Joshua from Spring Hill Primary School in Australia, the children from Waverley Primary School in the UK, and Dhruv from Pict in India, who all had similar strategies.

Why play this game?

This game offers a motivating context in which children can improve their logical thinking skills. It is a low threshold high ceiling game that is easily accessible but, at the highest level, has the potential to be generalised.

#### Possible approach

*This problem featured in an NRICH Primary webinar in June 2021.*

Introduce the game to the class by watching the video all through. Invite learners to ask questions or make comments, and use these to help clarify the rules. You may want to watch all or part of the video again if there are any uncertainties. Give pupils chance to play the game several times in pairs using seven counters or any other objects, so that they get a really good 'feel' for it.

Bring everyone together and explain that you're now going to focus on 'strategy', in other words, ways to win the game. Invite learners to share anything they have noticed so far with sentences such as, "I noticed that when I ..., xxxx happened". Try to value all children's noticings and then use the video again to focus your questioning.

Play the video from the beginning again, but this time pause it after Player 1's second turn (about 37 seconds in). Ask the class what they would do now if they were Player 2. Give everyone the chance to talk to a partner about their ideas, then draw the whole group together again. What do they notice? In fact, it is impossible for Player 2 to win now. Encourage learners to articulate the reasons for this by thinking more than one step ahead, and considering all possibilities, for example "If I took one counter, then the other player would..."; "If I took two counters, then...".

Help the class to understand that if we want to win this game, we need to leave exactly three counters for our opponent to have a turn. Challenge them to consider whether it is possible to be *absolutely certain* that you *will* be able to leave three counters. Give them lots more time to play the game and explore their ideas. They may find it helpful to record their moves
somehow and you can look out for useful ways to do this amongst the class and share them, as appropriate.

Any pair who thinks they have found a completely water-tight strategy can try it out in a game against you. You may also like the class to think abut how they can record their winning strategy, perhaps in the form of 'Top Tips' for a friend.

This game is a great one to share with families. Having introduced it in class, you can suggest that children teach a family member to play as part of their home learning.

#### Key questions

What happens when there are three counters left?

Does it matter who goes first? Why or why not?

How can you win at this game?

#### Possible support

You could offer to record a game for children who are struggling, and then you can then look back together at key moments. This might enable you to discuss what each player could have done differently at certain points in the game.

Playing with one pair against another pair means that learners have someone to talk to about their ideas, giving them confidence to play alone.

#### Possible extension

You can encourage the children to think about 'What if...?' questions, such as 'What happens if you start the game with a different number of counters?'. (A series of key numbers will emerge, as well as some interesting observations about odds, evens and multiples.) The game Got It is identical in structure to Nim-7 and would make a great follow-up task. The game Daisy, another Nim-like game, offers an interesting challenge too.