Current Staff & Students  |  Home  |  Library  |  Contact  |  Search  | Quick Find
  The University of Newcastle
Machine Intelligence for Hex
Your Location University > Faculty > Electrical Engineering and Computer Science > MIHex
 
 
The Rules of Hex

Hex is a strategy board game for two players. Both players are assigned two opposite sides of the rhomboid Hex board, and pieces are alternately placed in the board's hexogonal cells until one player connects their two sides of the board by an unbroken chain of pieces. Interestingly, no draw is possible. 

Despite the simplicity of the rules, playing Hex well is difficult. In general, good strategy is to play moves that maximise the connectivity between your two edges while simultaneously minimising the connectivity between your opponent's edges.

 

The Swap Rule

Theoretically Hex is a first player wins game, although for board sizes larger than 7x7 nobody knows the winning play. However, in order to reduce any potential advantage enjoyed by the first player, red, the Swap Rule can be used. The blue player, on their first move only, can choose whether to

  1. play a normal move, or
  2. swap, by removing the first red piece from the game and swapping it with a blue piece, where the new piece is placed where the red piece was and then flipped about the horizontal axis (on a diamond-shaped board).

The row and column of the red piece are swapped so that, for instance, a red piece on B5 becomes a blue piece on E2. The players keep the same colours and owned edges. You can see the rule in operation on the virtual Hex board below (blue has option to swap on first move).

Good opening strategy for red is to make a move which is not so strong that blue swaps, but not so weak that the opening move is irrelevant. A good first move will cause the blue player to have trouble deciding whether there is any advantage to swapping it or not.