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.
- 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
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.
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
Think of powers of 2 and see if the strategy to match the number of counters in each stack can be applied to the three stacks.
Let’s start with three stacks of 13, 9 and 7 counters.
13 can be written in terms of power of 2 as (8 + 4 + 1) or
Similarly, 9 can be written as power of 2 as ( 8 + 1 ) or
and 7 can be written as (4 +2 +1 ) or
Since the player A in above example can always match things up, we know that player A will win. Since by working in power of 2 we are sure that there are two set of powers of 2 that match exactly – and those two sets of power of 2 don’t come from the same stack ! We know that the player B can’t take away two of our sets and leave it still matched. Therefore, player A will win in the end if he can keep maintaining to match things up.
Which player has winning strategy depends on whether the stacks come with matching numbers of set of power of 2. If it does, the second player has the winning strategy since the first player must disturb the matching. Otherwise, the first player can make the sets of power of 2 match, and can go on to win.
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.
- How to build a Straw Bridge – STEM Activity
- Nim Game
- Multiplication Buzz
- Target Number- Order of Operations- Math Card Game
- Red Cabbage Science experiment – pH indicator
Pin it for later