From N small objects (pebbles, buttons, matches, etc.), playing alternately take at least one and no more than K pieces. The winner is the one who will be able to take the last object.
The outcome of the game is determined after the first move, if partners do not make mistakes.
The winning algorithm of the game Bashe easy to get, if you think "the end", that is, to consider first the position before the last turn. To win you need to leave the enemy before the last round K + 1. Then, how would he ever took (more K to take, on their own, you take the last item. Therefore, before the penultimate stroke should be left on the table 2(K + 1) items. In this case, when any progress opponent can respond so that the heap will remain K + 1 subject.
Thus, the game has a number of key positions
- K + 1,
- 2( K + 1),
- 3( K + 1) items
and so, when a beginner plays. Hence, if the initial position of the non-key, then you need to immediately get a key position, choose the "extra" items, and then confidently bring the game to win.
If in a special position your turn, it only remains to hope that the enemy did not read the literature, which describes a strategy game Bash, and to wait for his mistake.