Nim Game

The game of Nim

Nim is a really fascinating two player game of strategy where each players take turns removing counters from a single stack of their choice. The player to remove the last counter wins. Sounds very easy game, Right ? Give it a try and see if you can find a strategy to win every time.

Advertisements

Nim Game

  • Start with setting up as many stacks of counters as you want and each stack can have as many counters as you like. For example, you start with 3 stacks of counters, the first with 7, the second with 5 and the third with 3.
  • Players take turn removing any number of counters from any one of the stack. The player must take at least one counter on their turn.
  • The winner is the player who picks up the last counter.

How to Introduce Nim Game to Kids

I wanted to introduce my kids to a basic version of the NIM game and build on their problem-solving skills to find a strategy for solving Nim Game with multiple stacks of counters.

One Stack of Counters

Nim game with 1 pile

First, set up only one stack of counters and ask your kids if they want to go first or second ? Of course, children always want to go first and win. So hopefully, they will go first and grab all the counters and win. If not, grab all the counters on your turn and you will be the winner. Now set the game up again, and ask them if they will want to go first or second ?

So far, the game is pretty simple but it showed my kids that if they have one stack of counters left on their side, they’re winning.


Two Stacks of Counters

Next, play a simplified version of the two stack Nim game with just one counter in each stack. Ask your kids again if they want to go first or second ? Your kid will be quick to guess that going first is a guaranteed loser ! No matter which counter they choose, you can take the other counter to win.

So, the strategy for two stack Nim game is to get the counters down to a single counter in each stack on your opponent’s turn for you to win.

Now, setup two stacks with two counters in each stack ? Can you figure out the winning strategy for this one ?

The basic idea to winning is to try to make it so your move makes the stacks equal. On your turn, take counters off the bigger stack until both stacks are equal. This way, you compel your opponent to make the stacks unequal on their next turn, and you can evenly balance the stacks again on your turn. So no matter what the other player does, you copy their move and keep the stacks equal. In the end, you will win, because the other player will inevitably have to finish a stack and you can finish the last stack.

For this strategy to work, in order to win, you need to be in a position where you can make the stacks equal. That is, if the stacks start unequally the first player has a winning strategy and the second player otherwise has the winning strategy.

Play the game with two stacks and more counters to see if the strategy always work.


Further Extension

Once you have played the game a couple of times, ask your kids about different strategies to win the NIM game ?

  • Can you generalize to have a winning strategy for any number of stack? When is it advantageous to be the first player? Second player?
  • How can you win NIM when you are playing with three stacks? Does one of the players have a winning strategy? Which player do you think? Check out the HINT

The game of NIM teaches kids about problem solving. You can also find 30+ Critical thinking puzzles HERE.

Let’s stay connected. You can follow my facebook page at My World Their Way.

Pin it for later

4 Replies to “Nim Game”

  1. Sounds like a great game to play when we go up to WI this weekend. I love games that involve strategy and this one is great because it’s simple materials!

Leave a Reply

Your email address will not be published. Required fields are marked *