- #1
wololo
- 27
- 0
Homework Statement
Homework Equations
Tree data structures.
I think it might also have something to do with minimax algorithm, but it was only mentioned once and never discussed extensively in class so I doubt it is required.
The Attempt at a Solution
[/B]
If both players play as well as they can, the game will end in a draw. Player 1 will always have the option of choosing to draw rather than lose.
However I can't find a function that given n sticks will tell me who will win. For 5, 10 and other multiples of 5, player 2 necessarily wins but what about the other cases? How can I find a single formula that will necessarily tell me who will win, given that they play well?