It’s time for NIM!

NIM is a wonderful mathematics strategy game that has been around forever. At its most basic version, two players alternate turns taking objects from one or more piles. For each turn, a player removes at least one object. The winner of the game is the player who picks up the last object.

Whenever I need to change up the pace for the students in my class, I’ll bust out one of the many versions of NIM. Each version of the game only takes a couple minutes to explain to the students, but then it takes much longer for students to develop and hone a winning strategy.

The basic version of NIM

This is a two person game or can be played with the teacher vs. the class.  Start with any number of tiles in a row.  (Start with 13 tiles or so, otherwise the game takes too long to play.)  The object is to be the player to pick up the last tile. Players alternate taking turns. The only two rules are:

  1. When it is your turn, you must take either one or two tiles (no more than two).
  2. There is no “passing”.

Play continues with each player taking either one or two tiles until someone picks up the last tile.  Whoever does so, wins the game.

What’s the point?

Play the game with a partner and look for a winning strategy. Is it possible to win every time if the opposing player does not also know the winning strategy?

NIM is at its best when student partners begin playing together in their search for a winning strategy, rather than continue simply to “beat” each other. Perhaps intentionally losing is one way to identify the winning strategy.

When students think they’ve found a winning strategy, I have the student explain his/her strategy and then I play the student, making sure he/she uses the strategy. I do my best to pole a hole in their idea.

Variations:

Once the basic game has been solved, allow students to create variations of NIM. Here are a couple common variations…

  • Alter the maximum number of tiles that can be taken in a turn
  • Make the objective to be whoever picks up the last tile is the LOSER

Remember winning is not really the point of NIM. The real goal is to find a winning strategy that would allow one to win every time against someone who doesn’t know the strategy. Play this game collaboratively with a friend. Maybe first play a few games competitively where you are trying to win, but then work with your partner (not against) to find a winning strategy.

For many more versions of NIM, check out this Google Doc.

Leave a comment below if you have other versions of NIM that you know!