Search in Co-Wiki

Hex (board game)

game-theory 3891 tokens 10 outbound links

Hex (board game)

It is traditionally played on an 11×11 rhombus board, although 13×13 and 19×19 boards are also popular. It can also be played with paper and pencil on hexagonally ruled graph paper. The board is composed of hexagons called cells or hexes. Each player is assigned a pair of opposite sides of the board, which they must try to connect by alternately placing a stone of their color onto any empty hex. Once placed, the stones are never moved or removed. A player wins when they successfully connect their sides together through a chain of adjacent stones. Draws are impossible in Hex due to the topology of the game board.

Despite the simplicity of its rules, the game has deep strategy and sharp tactics. It also has profound mathematical underpinnings related to the Brouwer fixed-point theorem, matroids and graph connectivity.

Game type Hex is a finite, two-player perfect-information game, and an abstract strategy game that belongs to the general category of connection games. a particular type of positional-game. Since the game can never end in a draw, it became known in Denmark under the name Polygon due to an article by Hein in the 26 December 1942 edition of the Danish newspaper Politiken, the first published description of the game, in which he used that name.

Nash's claim The game was rediscovered in 1948 or 1949 by the mathematician John Nash at Princeton University. According to Martin Gardner, who featured Hex in his July 1957 Mathematical Games column, Nash's fellow players called the game either Nash or John, with the latter name referring to the fact that the game could be played on hexagonal bathroom tiles. Gardner privately wrote to Hein: "I discussed it with the editor, and we decided that the charitable thing to do was to give Nash the benefit of the doubt. ... The fact that you invented the game before anyone else is undisputed. Any number of people can come along later and say that they thought of the same thing at some later date, but this means little and nobody really cares."

Shannon's Hex machine About 1950, claude-shannon and E. F. Moore constructed an analog Hex playing machine, which was essentially a resistance network with resistors for edges and light bulbs for vertices. The move to be made corresponded to a certain specified saddle point in the network. The machine played a reasonably good game of Hex. Later, researchers attempting to solve the game and develop Hex-playing computer algorithms emulated Shannon's network to create strong computer players.

Research timeline It was known to Hein in 1942 that Hex cannot end in a draw; in fact, one of his design criteria for the game was that "exactly one of the two players can connect their two sides".

In 1981, Stefan Reisch showed that Hex is PSPACE-complete.

In 2002, the first explicit winning strategy (a reduction-type strategy) on a 7×7 board was described.

In the 2000s, by using brute force search computer algorithms, Hex boards up to size 9×9 (as of 2016) have been completely solved.

Starting about 2006, the field of computer Hex came to be dominated by monte-carlo-tree-search methods borrowed from successful computer implementations of Go. These replaced earlier implementations that combined Shannon's Hex-playing heuristic with alpha-beta search. On the subject of early Computer Hex, notable early implementations include Dolphin Microware's Hexmaster, published in the early 1980s for Atari 8-bit computers.

Until 2019, humans remained better than computers at least on big boards such as 19x19, but on 30 October 2019 the program Mootwo won against the human player with the best Elo rank on LittleGolem, also winner of various tournaments (the game is available here). This program was based on Polygames (an open-source project, initially developed by Facebook Artificial Intelligence Research and several universities) using a mix of: zero-learning as in AlphaZero boardsize invariance thanks to fully convolutional neural networks (as in U-Net) and pooling * and growing architectures (the program can learn on a small board, and then extrapolate on a big board, as opposed to justified popular claims about earlier artificial intelligence methods such as the original AlphaGo).

Strategy From the proof of a winning strategy for the first player, it is known that the Hex board must have a complex type of connectivity which has never been solved. Play consists of creating small patterns which have a simpler type of connectivity called "safely connected", and joining them into sequences that form a "path". Eventually, one of the players will succeed in forming a safely connected path of stones and spaces between their sides of the board and win. The final stage of the game, if necessary, consists of filling in the empty spaces in the path.

A "safely connected" pattern is composed of stones of the player's color and open spaces which can be joined into a chain, an unbroken sequence of edge-wise adjacent stones, no matter how the opponent plays. One of the simplest such patterns is the bridge, which consists of a diamond of two stones of the same color and two empty spaces, where the two stones do not touch. If the opponent plays in either space, the player plays in the other, creating a contiguous chain. There are also safely connected patterns which connect stones to edges. There are many more safely connected patterns, some quite complex, built up of simpler ones like those shown. Patterns and paths can be disrupted by the opponent before they are complete, so the configuration of the board during an actual game often looks like a patchwork rather than something planned or designed. The middle part of the game consists of creating a network of such weakly connected stones and patterns

Mathematical theory ### Determinacy It is not difficult to convince oneself by exposition, that hex cannot end in a draw, referred to as the "hex theorem". I.e., no matter how the board is filled with stones, there will always be one and only one player who has connected their edges. This fact was known to Piet Hein in 1942, who mentioned it as one of his design criteria for Hex in the original Politiken article. but apparently did not publish the proof. Its first exposition appears in an in-house technical report in 1952, in which Nash states that "connection and blocking the opponent are equivalent acts". A more rigorous proof was published by John R. Pierce in his 1961 book Symbols, Signals, and Noise.

An informal proof of the no-draw property of Hex can be sketched as follows: in a completely filled Hex board, consider the connected component of one of the red edges, i.e. all the red hexagons directly or indirectly connected to that red edge. The concept of a connected component is well-defined because in a hexagonal grid, two cells can only meet in an edge or not at all; it is not possible for cells to overlap in a single point. This component either includes the opposite red edge, in which case Red has a winning path from one edge to the other, or else it does not, in which case the blue stones along the boundary of the connected component form a winning path for Blue.

In 1979, david-gale published a proof that the determinacy of Hex is equivalent to the two-dimensional Brouwer fixed-point theorem, and that the determinacy of higher-dimensional n-player variants proves the fixed-point theorem in general.

First-player win, informal existence proof In Hex without the swap rule on any board of size nxn, the first player has a theoretical winning strategy. This fact was mentioned by Hein in his notes for a lecture he gave in 1943: "in contrast to most other games, it can be proved that the first player in theory always can win, that is, if she could see to the end of all possible lines of play". In this way they play the winning strategy with one extra piece always on the board. # This extra piece cannot interfere with the first player's imitation of the winning strategy, for an extra piece is never a disadvantage. Therefore, the first player can win. # Because we have now contradicted our assumption that there is a winning strategy for the second player, we conclude that there is no winning strategy for the second player. # Consequently, there must be a winning strategy for the first player.

Computational complexity In 1976, Shimon Even and Robert Tarjan proved that determining whether a position in a game of generalized Hex played on arbitrary graphs is a winning position is PSPACE-complete. A strengthening of this result was proved by Reisch by reducing the quantified Boolean formula problem in conjunctive normal form to Hex. This result means that there is no efficient (polynomial time in board size) algorithm to solve an arbitrary Hex position unless there is an efficient algorithm for all PSPACE problems, which is widely believed not to be the case. However, it doesn't rule out the possibility of a simple winning strategy for the initial position (on boards of arbitrary size), or a simple winning strategy for all positions on a board of a particular size.

In 11×11 Hex, the state space complexity is approximately 2.4×1056; versus 4.6×1046 for chess. The game-tree complexity is approximately 1098 versus 10123 for chess.

Computed strategies for smaller boards In 2002, Jing Yang, Simon Liao and Mirek Pawlak found an explicit winning strategy for the first player on Hex boards of size 7×7 using a decomposition method with a set of reusable local patterns. They extended the method to weakly solve the center pair of topologically congruent openings on 8×8 boards in 2002 and the center opening on 9×9 boards in 2003. In 2009, Philip Henderson, Broderick Arneson and Ryan B. Hayward completed the analysis of the 8×8 board with a computer search, solving all the possible openings. In 2013, Jakub Pawlewicz and Ryan B. Hayward solved all openings for 9×9 boards, and one (the most-central) opening move on the 10×10 board. Since Gardner first postulated in his column in Scientific American in 1957, albeit speciously, that any first play on the short diagonal is a winning play, for all solved game boards up to n=9, that has indeed been the case. In addition, for all boards except n=2 and n=4, there have been numerous additional winning first moves; the number of winning first moves generally is ≥ n²/2.

Variants Other connection games with similar objectives but different structures include shannon-switching-game (also known as Gale and Bridg-It) and TwixT. Both of these bear some degree of similarity to the ancient Chinese game of Go.

Rectangular grids and paper and pencil The game may be played on a rectangular grid like a chess, checker or go board, by considering that spaces (intersections in the case of go) are connected in one diagonal direction but not the other. The game may be played with paper and pencil on a rectangular array of dots or graph paper in the same way by using two different colored pencils.

Board sizes Popular dimensions other than the standard 11×11 are 13×13 and 19×19 as a result of the game's relationship to the older game of Go. According to the book A Beautiful Mind, John Nash (one of the game's inventors) advocated 14×14 as the optimal size.

Rex (Reverse Hex) The misère variant of Hex is called "Rex", in which each player tries to force their opponent to make a chain. Rex is slower than Hex since, on any empty board with equal dimensions, the losing player can delay a loss until the entire board is full. On boards with unequal dimensions, the player whose sides are further apart can win regardless of who plays first. On boards with equal dimensions, the first player can win on a board with an even number of cells per side, and the second player can win on a board with an odd number. On boards with an even number, one of the first player's winning moves is always to place a stone in the acute corner. It too has a board space composed of hexagonal tiles, however the board is itself in the shape of a large hexagon, and a win is achieved by forming one of three patterns.

Projex Projex is a variation of Hex played on a real projective plane, where the players have the goal of creating a noncontractible loop. Like in Hex, there are no ties, and there is no position in which both players have a winning connection.

Dark Hex Dark Hex (also known as Phantom Hex) is an imperfect information version of Hex. The players are not exposed to each other's stones at any point in the game unless they discover them first. The game is played in the presence of an umpire where each player first verifies the move if its a collision or not. Based on the continuation of this point the game has different versions.

Competition As of 2016, there were tournaments reported from Brazil, Czech Republic, Denmark, France, Germany, Italy, Netherlands, Norway, Poland, Portugal, Spain, UK and the US. One of the largest Hex competitions is organized by the International Committee of Mathematical Games in Paris, France, which is annually held since 2013. Hex is also part of the computer-olympiad. During this competition the pie rule is used.

Reviews Games & Puzzles* #16 '' #6

See also * Connection games * Mathematical games * GIPF project, a set of 6 games played on hexavalent grids *Tak

Notes ## References ## Further reading Hex Strategy: Making the Right Connections *, Browne C.(2000), A.K. Peters Ltd. Natick, MA. (trade paperback, 363pgs) HEX: The Full Story'', Hayward R. with Toft B.(2019), CRC Press Boca Raton, FL. (paperback)

External links * [Hex: A Strategy Guide](http://www.mseymour.ca/hex_book/hexstrat.html) free Net book by Matthew Seymour * [500 Hex Puzzles](http://www.mseymour.ca/hex_puzzle/hexpuzzle.html) Interactive tactical puzzles by Matthew Seymour * [A Beginner's Guide to Hex](https://drericsilverman.com/2021/02/15/a-beginners-guide-to-hex/) Hex strategy for beginners by Matthew Seymour and Eric Silverman * [Thesis on Hex](http://maarup.net/thomas/hex/) history, classification and complexity * [HexWiki](https://www.hexwiki.net/), a wiki dedicated to Hex * [University of Alberta Computer Hex Research Group](http://webdocs.cs.ualberta.ca/~hayward/hex/) * [Theory page](http://hex.kosmanor.com/hex/theory.html) gathering theoretical work on Hex (moved - top level pages at [Hex archive](https://web.archive.org/web/20041204023334/http://hex.kosmanor.com/hex/theory.html); downloadable material no longer available) * * [Game of Hex](http://mathworld.wolfram.com/GameofHex.html) at MathWorld with links to related mathematical papers * [Printable Hex boards](https://web.archive.org/web/20140308080351/http://quatramaran.ens.fr/~viger/hex/) on A4 or A3 paper, for use with standard Go stones * 300dpi printable Hex board https://sites.google.com/view/cavegames-hex/home * [Play Hex Online](https://playabstractgames.com/en/hex/) at Play Abstract Games, a free browser-based version with AI opponents.