Hex is a two-player game invented by Piet Hein in 1942 while a student at Niels Bohr's Institute for Theoretical Physics, and subsequently and
independently by John Nash in 1948 while a mathematics graduate student at Princeton.
The game was originally called Nash or John, with the latter name at the same time
crediting its inventor and referring to the fact that it was frequently played on
the tiled floors of bathrooms (Gardner 1959, pp. 74-75). The name Hex was invented
in 1952, when a commercial version was issued by the game company Parker Brothers.
Hex is played on a diamond-shaped board made up of hexagons. The game is usually played on a boards of size 11 on a side, for a total of 121 hexagons, as illustrated
above. In the game, one player plays white pieces, while the other plays black, with
play alternating between players and placement only allowed on unoccupied hexagons.
Alternate sides of the board are designated white and black as shown above, and the
goal of the game is to complete a chain of pieces between one player's two sides.
The game cannot end in a draw since no chain can be completely
blocked except by a complete chain of the opposite color.
In 1949, Nash showed using a reductio ad absurdum proof that there is always a winning strategy for the first player on an board of any size. However, this provides only an existence
proof. The win/lose status has been determined for every move in hex (Hayward). A winning strategy is known for and boards assuming a first play at the center of the board
(Yang), but not larger square boards. C. F. Shannon and E. F. Moore
built a hex-playing machine that associated a two-dimensional electrical charge distribution
with any given Hex position. This machine then made decisions based on properties
of the corresponding potential field (Shannon 1953).
For play on a
board, the second player, playing the shorter direction, can always win by playing
a mirror image move, as illustrated above (Gardner 1959).
A modified version changes the rules so that the first player to form a chain loses. For this variant, there is a winning strategy for the first player if there is an
even number of cells on each side; otherwise, there is a winning strategy for the
second player (Gardner 1959, p. 78).