Software:Chopsticks (hand game)

From HandWiki

}}

Short description: Hand game for two or more players
Error creating thumbnail: convert-im6.q16: width or height exceeds limit `/tmp/magick-yw53JIdlBXY1HWvcaelhaFQEEskhBrDI' @ error/cache.c/OpenPixelCache/3909. convert-im6.q16: no images defined `PNG:/tmp/transform_5102813d2b68.png' @ error/convert.c/ConvertImageCommand/3229.
The game's scores are tracked on the fingers of both hands.

Chopsticks (sometimes called Calculator, or just Sticks)[citation needed] is a hand game for two or more players, in which players extend a number of fingers from each hand and transfer those scores by taking turns tapping one hand against another.[1][2] 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.[3]

Description

Gameplay

Chopsticks consists of players tallying points using the fingers on their hands.

Each player starts with two points (one finger on each hand). Taking turns, players tap the opponent's hand, which adds points to it equal to the value of the tapping hand. A player’s hands do not change when the opponent’s hand is tapped. For example, if an opposing player has the maximum number of points on their hand, they may not subtract points from it if they decide to knock out the other player's hand, such as if a player has five points and the other has two, the player with five points cannot give the other player a portion of their points to avoid being knocked out. When a hand gets five or more points, it is "knocked out" and called a dead hand.[3] A dead hand cannot attack or be attacked. A player wins by knocking out both of their opponent's hands.

Instead of attacking on their turn, a player may "split" points among their hands. A split can be either a transfer or a division. A transfer involves moving a certain number of points from one living hand to another; transferring all points off one hand knocks it out ("suicide"), and is allowed in some variations.[3] A division can resurrect a dead hand by moving points from a living hand, bringing it back into play.[3] The new distribution must be distinct from the original distribution; a player may not simply swap points between hands.[3]

Due to the game's simple basic structure, there are many variations with additional rules.[1] In some variations, a sum greater than 5 "rolls over" to a smaller value by subtracting 5 from the sum (modular arithmetic); a hand is eliminated only when it has exactly five points. In other variations, more complex transfer and division moves are allowed.

Abbreviation

Each position in a two-player game of Chopsticks can be encoded as a four-digit number, with each digit ranging from 0 to 4, representing the number of active fingers on each hand. This can be notated as [ABCD], where A and B are the hands of the player who is about to take their turn, and C and D are the hands of the player who is not about to take their turn. Each pair of hands is notated in ascending order, so every distinct position is represented by one and only one four-digit number. For example, the code 1023 is not allowed, and should be notated 0123.

The starting position is 1111. The next position must be 1211. The next position must be either 1212 or 1312. During the game, the smallest position is 0000, and the largest position is 4444.

This abbreviation can be expanded to games with more players. A three-player game can be represented by six digits (e.g. [111211]), where each pair of adjacent digits represents a single player, and each pair is ordered based on when players will take their turns. The leftmost pair represents the hands of the player about to take his turn; the middle pair represents the player who will go next, and so on. The rightmost pair represents the player who must wait the longest before his turn (usually because he just went).

Moves

Under normal rules, there are a maximum of 14 possible moves:

  • Four attacks (A→C, A→D, B→C, B→D)
  • Four divisions (02→11, 03→12, 04→13, 04→22)
  • Six transfers (13→22, 22→13, 14→23, 23→14, 24→33, 33→24)

However, only 5 or fewer of these are available on a given turn. For example, the early position 1312 can become 2213, 1313, 2413, 0113, or 1222.

Game lengths

The shortest possible game is 5 moves. There is one instance:

  • 1111 1211 1312 0113 1401 0014

Without revisitation (repeating a position), the longest possible game is 9 moves. There are two instances:

  • 1111 1211 1212 2212 2322 0223 0202 0402 0104 0001
  • 1111 1211 1212 2312 2323 0323 0303 0103 0401 0004

With revisitation, the longest possible game is indefinite.

Positions

Since the roll-over amount is 5, Chopsticks is a base-5 game. In a two-player game, each position is four digits long. Counting from 0000 to 4444 (in base 5) yields 625 positions. However, this includes redundancies—most of these positions are incorrect notations (e.g. 0132, 1023, and 1032 are incorrect notations of 0123), which appear different but are functionally the same in gameplay.

To find the number of functionally distinct positions, note that each player can be one of 15 distinct pairs (00, 01, 02, 03, 04, 11, 12, 13, 14, 22, 23, 24, 33, 34, and 44). With two players, there are 15*15 = 225 functionally distinct positions. In general, for [math]\displaystyle{ n }[/math] players, there are [math]\displaystyle{ 15^n }[/math] functionally distinct positions.

However, there are 21 unreachable positions: 0000, 0100, 0200, 0300, 0400, 1100, 1101, 1200, 1300, 1400, 2200, 2202, 2300, 2400, 3300, 3303, 3400, 3444, 4400, 4404, and 4444.

  • 15 of these positions are simply one player having each of the 15 distinct pairs, and the other player being dead. The problem is that the dead player is the player who just took his turn (hence the "00" on the right side). Since the player can't lose on their own turn, these positions are unreachable.
  • 4 of these positions are the player to move having [kk], and the other player having [0k], where [math]\displaystyle{ 0 \lt k \lt 5 }[/math]. This is unreachable because the player who just went [0k] would not be able to split, so therefore that player must have attacked using his [0k]. But there's no way to use [0k] to attack an enemy so that they move to [kk]. That would require attacking a dead hand, which is illegal.
  • The remaining two positions are 3444 and 4444. 4444 is unreachable because a player cannot reach [44] from a split, and therefore had to already have [44]. The only possible pair that goes to [44] after being attacked by [44] is [04], which again requires that a dead hand be attacked. 3444 is actually reachable, but only from 4444. Since 4444 is not reachable from 4444, neither is 3444.

This gives a total of 204 unique, reachable positions.

There are 14 reachable endgames: 0001, 0002, 0003, 0004, 0011, 0012, 0013, 0014, 0022, 0023, 0024, 0033, 0034, 0044. Satisfyingly enough, these are all the 14 possible endgames; in other words, someone can win using any of the 14 distinct live pairs. Out of these 14 endgames, the first player wins 8 of them, assuming that the games are ended in the minimum number of moves.

Generalisations

Chopsticks can be generalized into a [math]\displaystyle{ (p,r) }[/math]-type game, where [math]\displaystyle{ p }[/math] is the number of players and [math]\displaystyle{ r }[/math] is the rollover amount.

Fewer than two players

In a one-player game, the player trivially wins for virtue of being the last player in the game. A game with zero players is likewise trivial as there can be no winners.

Two players

Given [math]\displaystyle{ p=2 }[/math] and a rollover of [math]\displaystyle{ r }[/math],

  • There are [math]\displaystyle{ r^{2p}=r^4 }[/math] positions, including redundancies.
  • There are [math]\displaystyle{ {r + 1 \choose 2} }[/math] distinct finger pairs (the [math]\displaystyle{ r }[/math]-th triangular number), and thus [math]\displaystyle{ {r + 1 \choose 2}^p }[/math] functionally distinct positions.
  • For [math]\displaystyle{ r \gt 2 }[/math], there are [math]\displaystyle{ {r + 1 \choose 2} + (r - 1) + 2 }[/math] unreachable positions.
    • [math]\displaystyle{ {r + 1 \choose 2} }[/math] unreachable positions occur when the current player has any distinct pair and the other player is dead. However, the dead player is the player who just took his turn. Since a player can't lose on their own turn, these positions are unreachable.
    • [math]\displaystyle{ (r - 1) }[/math] unreachable positions occur when the current player has [math]\displaystyle{ A=B=k }[/math] and the other player has [math]\displaystyle{ C=0 }[/math] and [math]\displaystyle{ D=k }[/math], for [math]\displaystyle{ 0 \lt k \lt r }[/math]. These positions are unreachable because the other player [CD] did not have split on the previous turn, so must have attacked using their alive hand. However, there is no way to attack as such that results in the target having both hands of value [math]\displaystyle{ k }[/math], as this would require attacking a dead hand, which is illegal.
    • An unreachable position occurs when both players have two hands of value [math]\displaystyle{ r - 1 }[/math]. As such, the previous player could not have split, so must have attacked. But to result in the opponent's hands both having of value [math]\displaystyle{ r - 1 }[/math] would have required attacking a dead hand, which is illegal.
    • An unreachable position occurs when the current player has [math]\displaystyle{ A=r-2 }[/math] and [math]\displaystyle{ B=r-1 }[/math], and the other player has [math]\displaystyle{ C=D=r-1 }[/math]. This position has only one previous position, which is unreachable from the starting position.

Thus, for [math]\displaystyle{ r \gt 2 }[/math], there are [math]\displaystyle{ {r + 1 \choose 2}^p - \left({r + 1 \choose 2} + (r - 1) + 2\right) }[/math] reachable positions.

Rollover Positions Functionally distinct positions Reachable positions
3 81 36 26
4 256 100 85
5 625 225 204
6 1296 441 413
7 2401 784 748
8 4096 1296 1251
9 6561 2025 1970
10 10000 3025 2959
11 14641 4356 4278
12 20736 6084 5993

More than two players

Given a rollover of 5,

  • With 2 players, there are 204 positions.
  • With 3 players, there are 3,337 positions.
  • With 4 players, there are over 25,000 positions.

Degenerate cases

A game with a rollover amount of 1 is the trivial game, because all hands start dead.

A game with a rollover amount of 2 is degenerate, because splitting is impossible, and the rollover and cutoff variations result in the same game. Hands are either alive and dead, with no middle state, and attacking a hand kills the hand. In fact, one could simply keep count of the number of 'hands' a player has (by using fingers or some other method of counting), and when a player attacks an opponent, the number of hands that opponent has decreases by one. There are a total of [math]\displaystyle{ 2^p - 1 }[/math] reachable positions in the game, and a game length of [math]\displaystyle{ 2p - 1 }[/math]. The two player game is strongly solved as a first person win.

When two players have only one hand, the game becomes degenerate, because splits cannot occur and each player only has one move. Given a rollover of [math]\displaystyle{ r }[/math], each position after [math]\displaystyle{ k }[/math] moves in the game can be represented by the tuple [math]\displaystyle{ \left(F_{k + 2} \bmod r, F_{k + 1} \bmod r \right) }[/math], where [math]\displaystyle{ F_k }[/math] is the [math]\displaystyle{ k }[/math]-th Fibonacci number with [math]\displaystyle{ F_0 = 0 }[/math] and [math]\displaystyle{ F_1 = 1 }[/math]. The number of positions is given by least positive number [math]\displaystyle{ k }[/math] such that [math]\displaystyle{ r }[/math] divides [math]\displaystyle{ F_{k + 2} }[/math]. This variant is strongly solved as a win for either side depending upon [math]\displaystyle{ r }[/math] and the divisibility properties of Fibonacci numbers. The length of the game is [math]\displaystyle{ k + 1 }[/math].

Variations

  • Misère: First player to have both of their hands killed wins.
  • Suicide: Players are allowed to kill one of their own hands with a split. For example, in the position 1201, a player could execute 12→03, thus bringing the game to 0103. The opponent is forced to play B→D, bringing the game to 0401, at which point a quick win for the first player is possible.
  • Swaps/Cherri: If players have two unequal live hands, they may swap them (though forfeiting their turn). This variation commonly yields a draw by repetition or infinite loop for obvious reasons. To avoid this, limits can be placed on the number of consecutive swaps a player can do without being attacked before they are forced to attack.
  • Sudden Death: Players lose when they only have one finger left (on both hands). Alternately, each player could begin with three lives, and every time they get down to [01], they lose a life.
  • Meta: If a player's hands add up to over five, they can combine them, subtract five from the total, and then split up the remainder. For example, [44] adds up to 8, which becomes 3 after subtracting five; these can then be split into [12]. Therefore, it is possible to go from [44] to [12] in a single move. Meta unlocks 2 new possible moves (34→11, 44→12). If playing both Meta and Suicide, four additional moves are unlocked (24→01, 33→01, 34→02, 44→03), for a maximum of 20 possible moves in total.
  • Logan Clause: Players are allowed to suicide and swap, but only if doing both simultaneously (i.e. swapping a dead hand for a live one).
  • Death Attack: Players are allowed to attack dead hands. Attacking a dead hand will treat the dead hand as a 0 before being attacked.
  • Cutoff or Game of Five: If a hand gets above five fingers, it is dead (as opposed to rollover, described in the official rules).[3]
  • Zombies: With three or more players, if a player is knocked out, then they are permanently reduced to one finger on one hand. On their turn, they may attack, but may not split or be attacked (invented by Chris Bandy).
  • Transfers only: Divisions are not allowed. The only splits allowed are transfers.
  • Divisions only: Transfers are not allowed. The only splits allowed are divisions.
  • Splits: Splitting is only allowed when dividing an even number into two equal halves, or optionally, an odd number being divided as evenly as possible (using whole numbers). In this variation, the second player has a winning strategy (can always force a win).[3]
  • Stumps / Knubs: If a player is at [01], it is legal to split into [0.5 0.5], represented by curling a finger down halfway.[3]
  • More Hands: Each player has "more than two hands", usually represented by playing in teams of multiple people. With more hands per player, different transfer, division, swapping, and suicide rules are possible, including:
    • Single transfer: Each player can transfer fingers between only two hands.
    • Multiple transfer: Each player can transfer fingers between more than two hands, so long as the resulting state is different from the original state.
    • Single Division: The player can transfer fingers from only one hand to only one dead hand.
    • Partition: The player can transfer fingers from only one hand to multiple dead hands.
    • Transfer and partition: The player can transfer fingers from multiple hands to revive dead hands.
  • Different Numbers: A hand dies when it reaches a positive number [math]\displaystyle{ r }[/math] (in standard Chopsticks, [math]\displaystyle{ r = 5 }[/math]). Different hand counting systems could be used for numbers greater than 5 such as Chinese hand numerals, senary finger counting, and finger binary. This variation often includes rollovers.
  • Suns: Both players start with a 4 on each hand (4444). This is a position that is unreachable in normal gameplay (i.e. from the opening position 1111).
  • Integers: It is permitted to swap one of one's own hands by flipping it over, changing the +/- sign of the hand. This allows for negative and zero value hands, though a hand still dies at 5 or −5. With rollover, this action becomes identical to replacing the value of the hand with 5 minus the value.
  • Unnamed: Attacking own hands are allowed, adding two additional moves (A→B, B→A). Typically played in conjunction with Swap and Cutoff variants.
  • Cherry Bomb: Transferring to exactly 5 will cause the attacker's hand to become [11] and the target's hand to become [01]. In a two-player game, the position becomes 1101, which becomes an easy forced win, so it is best played with more than 2 people.
  • Self-adding: As their turn, players can add 1 finger to any living hand, or transfer multiple fingers to a dead hand. This enables self-destruction (by adding 1 to a living hand with 4 fingers) and resurrection. This game variation has more complicated strategy.

Optimal strategy

Using the rules above, two perfect players will play indefinitely; the game will continue in a loop. In fact, even very inexperienced players can avoid losing by simply looking one move ahead.

In the cutoff variation, the first player can force a win. One winning strategy is to always reach one of the following configurations after each move (preferentially choosing the first one):

  • 1211 (starting here)
  • AB12, where A and B can be any number of fingers (winning immediately if possible)

Conversely, in the Division and Suicide only variation, then the second player has a winning strategy.[4]

See also

  • Morra (game) – a different hand-game, which is based on chance rather than logic.

References

External links