Predict Winner and Optimal Strategy in Substraction Game of 3 Towers

combinatorial-game-theorygame theoryoptimization

Given the following game, what is the strategy to win?

  • There are 3 heaps with m, n, k stones respectively. m, n, k must all be >1 and can be the same.
  • At each turn, each player can take either 1 from a single tower or 2 stones from 2 different towers (1 from each tower)
  • EDIT: The winner is the person to take the last stone(s). Thus, (0, 1, 1) or (0, 0, 1) are winning positions.

I need to know given a position who is predicted to win and what's the best move to take.

I've been trying to compare this problem with Nim, Substraction Games, Grundy Numbers etc., but the problem is that they are all based on taking an amount larger than 1 from a single tower.

Any help is appreciated. Thanks in advance!

Best Answer

Unfortunately, it turns out simply.
Losing positions are where $(m,n,k)$ are either all even or all odd.
It is more complicated if the last stone loses, I don't have a formula for that.

Related Question