[Math] Misere NIM game

discrete mathematics

I am having difficulty trying to attempt this question. Any help would much be appreciated.
Thank you.

In (9,2,31)−Misère NIM, the game begins with a pile of N stones. On their turn, a player can take 1, 2, or 3 stones. The player that takes the last stone loses the game.

(a) Do a complete analysis of Misère NIM as the game is defined above. Determine which player has a winning strategy for any value of N

Best Answer

For only $7$ stones, you can do it by hand. Define the positions as $P$(revious) and $N$(ext) depending on whether the previous player wins or the next player wins. A position is $N$ exactly when there is a move to a $P$ position. It is $P$ if there is no move to an $N$ position. Who wins a game with 1 stone? With 2 stones? With 3? Once you get to $7$ stones maybe you can see a pattern.