# Swap rule

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The swap rule states that after Red plays the first move, Blue decides whether to swap colours or not. If Blue swaps colours, Blue becomes Red and Red becomes Blue. Whichever player ends up being Blue makes the second move and then the game continues as usual.

## Reason for the swap rule

When playing Hex without the swap rule, the first player has a considerable advantage. The swap rule was devised to make the game more even. Namely, if the first player plays a move that is too strong, the second player will swap and be in a strong position. And if the first player plays a move that is too weak, the second player will not swap (and therefore also be in a strong position). Therefore, the swap rule creates an incentive for the first player to play a move that is as fair as possible.

The swap rule is sometimes also called the "pie rule", since it resembles the well-known "you cut, I choose" method for fairly dividing a pie between two people. Namely, one person cuts the pie in two, and the other person chooses which piece to eat. Here, the incentive for the first person is to make the two pieces as equal as possible.

Since each opening move is theoretically either winning or losing, there exists no opening move that is exactly fair. For this reason, the second player theoretically has a forced win when playing with the swap rule. However, the second player's advantage is very small, and certainly much smaller than the first player's advantage would be when playing without the swap rule.

## Implementations of the swap rule

Swapping can be implemented in two ways, as follows. As usual, we assume that the players are Red and Blue, with Red going first.

1. "Swap sides": The players perform the swap by switching colours: Red becomes Blue and Blue becomes Red. After the swap, it is Blue's turn.
2. "Swap pieces": The players perform the swap by switching pieces. This means the initial red piece is replaced by a blue piece in the mirror image position, where the mirroring takes place with respect to the board's long diagonal. For example, a red piece at a3 becomes a blue piece at c1. The players do not switch colours: Red stays Red and Blue stays Blue. After the swap, it is Red's turn.

In face-to-face play, the "swap sides" method is most practical, since it is easier for the players to switch colours than to remove and add pieces on the board. This is especially true when playing with pencil and paper. It is also less error-prone. On online game sites, the "swap pieces" method is more common, presumably because the colours are determined at the start of the game, and it is easier to change the board position than the colour designation. This also makes the game record more readable, since it is always clear which player was "Red" and which was "Blue".

## When to swap

The decision whether to swap is an important one. Accidentally swapping a weak move, or accidentally failing to swap a strong move, is bad for the second player.

Different players have different preferences for which moves to swap. It is generally agreed that moves near the center of the board are far too strong and should be swapped, whereas moves on the first player's own edge (except in the obtuse corner) are too weak and should not be swapped. a1 and b1 are provably losing and should never be swapped. a3–a8, a10, a11, c2, and c10 (on an 11 × 11 board) are relatively balanced, and whether or not to swap them depends on the player's preferences. a9 is fairly weak and should probably not be swapped. Of course, the same applies to the corresponding cells on the opposite side of the board.

To get an idea of which opening moves are winning, it is useful to study the situation for small boards. For boards up to size 9 × 9, the winning opening moves are known. While the winning opening moves have not been solved for boards of size 10 × 10 or greater, it is reasonable to extrapolate from the smaller board sizes. On the small boards, the red hexes should be swapped, and the blue hexes should not be swapped. Fair opening moves are probably the ones that are near the boundary of red and blue.

Some strong players have suggested that when a position is roughly balanced, having an extra stone on the board usually makes the game easier to play. This means that whenever there is doubt about a move, it might be a good idea to swap it. However, the first player can take advantage of this behaviour by playing a first move that is probably losing under perfect play. This idea has been popularized by "lazplayer" at littlegolem/igg.

Another consideration is not to use the same opening move all the time. Some players may be very familiar with particular openings. Playing an unfamiliar opening can confuse the opponent.

In the following diagrams, it is suggested that an opening move played in a red cell is probably winning and should be swapped; those in a blue cell are probably losing and should not be swapped; and those marked "*", which are near the boundary of red and blue, are probably relatively fair opening moves. It must be kept in mind, however, that these diagrams reflect somebody's sugjective guess. The opening on 11 × 11 boards has not been solved, so nobody really knows for sure which moves are winning or losing. Many players have different opinions on when to swap.

### Size 13

Based on Hex: A Strategy Guide by Matthew Seymour.

Based on the swap map of leela_bot, a very strong computer player on LG. Moves have been marked as "close" when the odds of winning are within 10% of even (40-60%).

TODO

## A more general swap rule

It has been suggested that one could use a more general swap rule. Under this proposal, instead of placing just one piece, the first player places any number of red and blue pieces, and state which color has the next move. Let's assume that the first player has placed N stones in the board. The second player then can start playing Hex with one color of his choice or, if he fears that the other player has an excessive advantage due to home preparation, he can swap roles with the first player, remove all stones from the board and place at most N-1 stones as he wants. This rule has been first proposed by "lazplyayer" at littlegolem/igg. However, it is not widely used, nor implemented by any game sites.