Hex is a two-player board game, played on a diamond-shaped board made
of hexagons. The size of the board may vary, but there are always an equal
number of hexes along each edge.

a 5x5 Hex Board

The players, White and Black, each own two opposite edges of the board.
The players take turns placing their pieces on any open hex. Either side
may move first.

The object of the game is for each player to create an unbroken chain
of their own pieces, which connects their two edges of the board. The
first player to create such a chain is the winner. It does not matter
what path the chain takes across the board in order to connect the two
edges.

a win for White

Hex was created in 1942 by the Danish inventor Piet Hein, and independently
by the American mathematician John Nash in 1948. The game was known
as Polygon in Denmark, where it was very popular in the 1940's,
and as Nash in the United States, where it was played in university
mathematics departments.

In 1952 it was marketed in the U.S. by Parker Brothers, who gave it
the name Hex. The commercial game is no longer available, but
Hex has retained its popularity over the years among game players, mathematicians,
and computer scientists.