I assume normal play, so that if there are insufficient buttons for you to take an increased number, then you can't move and lose. Then, for n = 0, 1, 2, ... if you are in the range 3n^2 + 2n to 3n^2 + $n, e.g., 0; 5-6; 16-20; 33-39; ... P-positions (previous player winning). Nim-value 0. Remoteness 2n. 3n^2 + 4n + 1 to 3n^2 + 5n, e.g., empty; 8; 21-22; 40-42; ... N-positions (next player winning). Nim-value 2. Remoteness 2n+1. Win by taking 1. 3n^2 + 5n + 1 to 3n^2 + 6n + 1, e.g. 1; 9-10; 23-25; 43-46; ... N- 1. 2n+1. Win by taking 1. 3n^2 + 6n + 2 e.g., 2; 11; 26; 47; ... N- 1. 2n+1. Win by taking 1 or 2. 3n^2 + 6n + 3 to 3n^2 + 7n + 2, e.g., empty; 12; 27-28; 48-50; ... N- 1. 2n+1. Win by taking 2. 3n^2 + 7n + 3 to 3n^2 + 8n + 4, e.g., 3-4; 13-15; 29-32; ... N- 2. 2n+1. Win by taking 2. When you CAN win, I suspect that a winning strategy is to increase by 1 when your opponent has increased by 2, and to increase by 2 when your opponent has increased by 1. As the values are only 0, * and *2, I guess that the mis`ere play is analyzable. The game with more than one heap may be quite tricky to analyze, if you assume that when it is your turn to move you must take 1 or 2 more buttons than before, regardless of which heap you take them from. R. On Tue, 29 Jul 2003, Jon Perry wrote:
Let there be n buttons. A player may take 1 or 2 buttons MORE than his/her opponent took. Player 1 can take either 1 or 2 buttons.
e.g. 28->27->25->21->15->7->0
(the last player must take either 8 or 9, as only 7 remain, they must take them all).
What are the strategies for various n, with either last button wins/loses? Jon Perry perry@globalnet.co.uk http://www.users.globalnet.co.uk/~perry/maths/ http://www.users.globalnet.co.uk/~perry/DIVMenu/ BrainBench MVP for HTML and JavaScript http://www.brainbench.com