# NIM!  Arrrrgh!  Help!

**URL:** <https://boards.straightdope.com/t/nim-arrrrgh-help/84718>\
**Category:** Factual Questions\
**Created:** [October 1, 2001, 4:06am UTC](https://boards.straightdope.com/t/nim-arrrrgh-help/84718 "2001-10-01T04:06:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leaper](https://avatars.discourse-cdn.com/v4/letter/l/4bbf92/32.png) [@Leaper](https://boards.straightdope.com/u/Leaper)\
**Post date:** [October 1, 2001, 4:06am UTC](https://boards.straightdope.com/t/nim-arrrrgh-help/84718/1 "2001-10-01T04:06:58Z")

</div>

I’m playing a Playstation video game which presents the following varient of the game of NIM as a side-game: three piles of randomly chosen, but often roughly equal, sizes. You can take 1, 2, or 3 stones from any one pile. Whoever takes the last stone wins, and you always choose who goes first.

Now, even a non-mathematician like myself can see that given these circumstances, you SHOULD be able to win almost every, if not every, time. But is there a relatively easy to understand strategy I can use without knowing anything about binary numbers, or are all winning strategies so steeped in complex math that I couldn’t possibly grasp it? Any help is appreciated!

---

<div class="post-metadata">

**Author:** ![Ottoerotic](https://avatars.discourse-cdn.com/v4/letter/o/6de8d8/32.png) [@Ottoerotic](https://boards.straightdope.com/u/Ottoerotic)\
**Post date:** [October 1, 2001, 5:54am UTC](https://boards.straightdope.com/t/nim-arrrrgh-help/84718/2 "2001-10-01T05:54:52Z")

</div>

Just set it up so that as the game is ending you always leave 4 rocks. I assume it is only 2 players otherwise things get a little dicey.

---

<div class="post-metadata">

**Author:** ![DaveW](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@DaveW](https://boards.straightdope.com/u/DaveW)\
**Post date:** [October 1, 2001, 6:27am UTC](https://boards.straightdope.com/t/nim-arrrrgh-help/84718/3 "2001-10-01T06:27:39Z")

</div>

Um, if you leave one stone in pile A, one in pile B, and two in pile C, for a total of 4 stones, you’ve lost, if the computer opponent is any good (takes both stones from pile C on the next turn, in other words).

My advice, humble as it is, would be to attempt to eliminate one entire pile _while_ always reducing the total number of stones to a multiple of four. Once you get to a two-pile version of the game, it should be a snap.

With that said, if the total number of stones in all three piles is a multiple of four at the start of the game, you don’t want to go first. Otherwise, you do. But, I’ll also assume that you don’t get to count _before_ choosing who goes first, in which case, if the opponent is at all versed in the game, you _will_ lose one game out of four simply due to chance.

What Playstation game is it, anyway? My wife is getting back into console gaming after a break due to the birth of our first child… and I don’t think she knows Nim (hehehe).
