*** Welcome to piglix ***

Chopsticks (hand game)


Chopsticks is a hand game for two players, in which players extend a number of fingers from each hand and transfer those scores by taking turns to tap one hand against another. Chopsticks is an example of a combinatorial game, and is solved in the sense that with perfect play an optimal strategy from any point is known.

Each player uses both hands to play the game, the number of digits extended on a hand showing the number of points that the hand has. Both start with each hand having one point — one finger extended on each hand. The goal of the game is for a player to force their opponent to extend all of their fingers and thumbs on both hands. A hand with all fingers and its thumb extended is called a dead hand and is taken out of play. (In another variation, the score has to be exactly five, and if the resulting number is more than five, five is subtracted from it, and the resulting number is displayed on the hand. For example, if a hand with 4 points is tapped by a hand with 2 points, the hand with 4 points becomes a hand with 1 point. This rule is called a 'roll over'.)

Players take turns to tap one of their live (not dead) hands against another live hand (either their own other hand, or one of their opponent's). The number of points on the tapping hand is added to the number on the tapped hand, and the player with the tapped hand extends their digits to show the new score. The tapping hand remains unchanged.

A player may alternatively tap their two hands together to transfer points from one hand to the other, as long as both hands remain alive. This is called a split. For example, if a player had three points on the right hand and one on the left hand, the player could rearrange them to have two on each hand. In short, [3,1] can be split into [2,2]. In many variations, the new pair must be different from the original (in particular [3,1] cannot be split into [1,3]). A live hand can be split into two live hands, such as [3] into [1,2], but two live hands cannot be 'split' into one. A player cannot pass the turn.

For the specific variation described above, the first player has a winning strategy (can always force a win). One winning strategy is to always reach one of the following configurations after each of your moves, preferentially choosing the first one in the list if there is more than one choice. Each configuration will be given as [a,b],[c,d] where [a,b] represents your two hands (ignoring order) and [c,d] represents your opponent's.


...
Wikipedia

...