Nim with one pile full

69 Views Asked by At

We play Nim with two players $A$ and $B$, where $A$ has the first move. We play with six piles, the first three of which have $7$ stones and the next three have $4,5$,and $8$ stones.

$A$ and $B$ play Nim with the rules that the game ends when five of the six piles have been emptied. If they play like this, what is the optimal strategy and who wins?

I tried working on this and I got a little lost. My first thought is that best play is to eliminate all the stones in each pile except for one each at a time, but I was unsure of who wins.