Abstract
Kriegspiel Hex (aka. DarkHex) is a variant of Hex in which players do not see the opponent’s stones. Due to incomplete information, there exist boards for which neither player has a (pure) winning strategy. The main contribution of this paper is a classification of small boards based on the outcome of the game for optimal players; (i) first player can win, (ii) second player can win, or (iii) neither player can win. For boards without winner, optimal players must follow mixed strategies that maximize their winning probabilities. In this context, solving the game means computing the corresponding Nash Equilibrium (NE). This paper provides then a brief introduction on how to compute these NEs and some preliminary results are given for the
Introduction
In 2016, during the “Computers and Games” conference held in Leiden, Ryan Hayward introduced us to DarkHex.1
We thank him for interesting discussions during CG’16 and ACG’17.
Rules (informally). DarkHex is a two-player game played on two identical rhomboidal boards with hexagonal cells; one board for each player. There is also an umpire who can look at both boards. From the umpire point-of-view, the two boards are combined into a single one on which the usual rules of Hex apply: alternatively players add a stone to the board and try to create a path connecting two opposite sides. The first player to link his opposite sides wins the game.
In DarkHex, each player plays on his2
For brevity, we use “he” and “his” whenever “he or she” and “his or her” are meant.
Notations. Black denotes the first player and White is the second player. The

The
Solving DarkHex. In regular Hex, the first player wins on the
In DarkHex, the situation is more complex. For some instances, there is no winner. More specifically, the boards can be partitioned in three groups:
Boards on which the first player wins, Boards on which the second player wins, Boards on which neither player has a winning strategy.
For boards belonging to the third category, there exists no optimal deterministic strategies, also known as pure strategies. Each optimal player must follow a mixed strategy – a probabilistic distribution of pure strategies – that maximizes his winning probability. The combination of both players’ strategies results in a Nash Equilibrium (NE), a concept introduced in Nash (1950). In this context, solving the game means (1) computing the value of the NE and (2) finding the associated optimal strategies. The NE value corresponds to the optimal winning probabilities of both players.
Contributions. Our contribution is twofold. First, we study boards on which one of the players has a deterministic winning strategy. After introducing some simple examples, Section 2 describes the algorithm used to check the existence of winning strategies, and summarizes our results. Second, we investigate boards on which no player is able to win. Section 3 illustrates the notions with an ad-hoc fictitious game and then presents some techniques to compute approximate NEs.
This section describes first some simple results that can be easily obtained and verified by handmade computations. It also introduces visual representations of DarkHex strategies. Finally, it explains how to check the existence (or the lack) of winning strategies for a given board.
Winners on small boards
Trivially, the first player always wins on the
On the

Winning strategy for the first player (Black) on the

Winning strategy for the second player (White) on the
On the
Since the first player (Black) wins on the

Winning strategy for the second player (White) on the
The first player (Black) has a winning strategy on the

Pseudocode to check if Black wins on a given board.
Algorithm. Figure 5 gives a recursive algorithm that checks if the first player (Black) has a winning strategy on a given board.3
A similar algorithm can be written for White. One needs to take into account that there may be one more black stones than the number of white stones.
For Black to have a winning strategy, there must be at least one cell
Results. We implemented the algorithm in C++ using standard hashtables (
Table 1 summarizes the results computed so far. In the table, 1 means that the first player wins, 2 means that the second player wins, 0 means that neither player can win, empty cell means that result is still unknown. Red circled values denote the values that need to be computed; other values can be deduced. Gray arrows indicate reductions between boards.
Figure 6 depicts all initial winning moves for some boards. As expected, the winning moves are a subset of winning moves for regular Hex. The winning moves for the
Winner on the

Initial winning moves for some small boards.
Partition and reductions. We first state two simple lemmas whose proofs are omitted. Then we propose a theorem showing a reduction from a first player strategy to a second player strategy.
If the first player wins on the
(sketch of) Assuming the first player has a winning strategy S on the In order to win, the second player follows strategy S on Since the first player cannot have an advantage on both (Simple reductions).
To illustrate the notions introduced in this section, we first analyze an ad-hoc variant of the game. Then we describe techniques and algorithms that can be used to solve such type of no-winner boards. Finally, we present preliminary results for the
Interesting variant on the
board
Rules. Let us assume that Black is forced to play in the center for his first move and both players are aware of this forced move. Except for the first forced move; players are free to play where they want. In this case, neither player has a winning strategy that would guarantee a certain win. For each player, the best possible strategy is a mixed strategy (i.e. including probabilistic moves).

Probabilistic strategy for the first player (Black).

Probabilistic strategy for the second player (White).
Strategies. Let consider the partial strategy for Black depicted on Fig. 7. It is partial in the sense that not all reachable boards are considered. If the game reaches a board not listed in the strategy, then Black plays randomly or resigns (it does not matter; he cannot win anymore if White plays correctly). Note that in the first board of Fig. 7, there are two possible moves; each of them should be played with probability 0.5.
Similarly, we consider the partial strategy for White depicted on Fig. 8. Again, if the game reaches a board not listed in the strategy, then White resigns.
Outcome. Assuming that Black and White play respectively the strategies of Fig. 7 and 8, then each player wins with probability 0.5. This can easily be checked by playing the four possible games (two choices for each player).
For both players, 0.5 is the best winning probability they can achieve. This pair of strategies corresponds to one4
There are other strategies leading to a NE, but the outcome is always the same: each player wins with probability 0.5.
Observation. There is no good pure (i.e. deterministic) strategy for any of the two players. If Black (resp. White) plays a pure strategy, White (resp. Black) can counter it and wins. Optimal play requires to follow mixed strategies.
One way of computing exact Nash equilibrium is to consider all pure (i.e. deterministic) strategies for each player, then compute the payoff matrix (here only win/loss values), and finally solve a linear system to obtain the NE (as in Bonnet and Viennot, 2016, 2017).
Unfortunately, this approach is far from being practical for DarkHex. There are far too many strategies for each player. For example, for the
This can be reduced by considering symmetries and stopping strategies when there is a winner. The exact number of strategies for P1 is: 150 566 311 779 241 374 060 368 185 395 045 821 314 548 426 870 441 971 814 912 440 364 364 139 719 859 109 888 000 000 000 000 000 000 000 000 000 000. This is much larger than the number of strategies for regular Hex for the same board:
Guessing optimal strategies. For a given board, let us denote
Let us assume that we can guess a pair of optimal strategies. It is then possible to check if these strategies are indeed optimal:
Considering Conversely, let us fixed a strategy If we can guess optimal strategies
Iterative guessing. Unfortunately, it is difficult to guess optimal strategies for non-trivial boards. However, it is possible to obtain successive approximations of optimal strategies following the iterative method described in Robinson (1951).
Informally, given a non-optimal pair
According to Table 1, the What is the value of the Nash equilibrium (optimal winning probabilities)? What are the optimal strategies of both players?
Using our current implementation of the iterative method, we obtained the following bounds for the optimal winning probabilities:
Given an improved implementation, additional running time, and/or more computational power, it is certainly possible to obtain better bounds. However, using the iterative method, it is unlikely that the execution will converge exactly to the Nash equilibrium. Indeed, Such approach usually lead to an approximate Nash equilibrium. Hopefully, it may be possible to “manually” guess the exact optimal strategies given the best approximations obtained.
Conclusions
This paper gives a first shot at the analysis of DarkHex. This is far from a complete study and there are still many problems to solve.
Open questions. In addition to solving more boards, there are some theoretical questions that remain open and are worth investigating:
For a given n, it seems natural to expect that there exists some value Considering the
For boards without winner, it is yet unclear what would be the most efficient technique to compute optimal strategies, or at least some approximations of them. We think that it should be the main direction of focus for future researches related to DarkHex. A reasonable, but difficult, short-term objective would be to solve the
Footnotes
Acknowledgements
We would like to particularly thank one of the anonymous reviewers for helpful comments, and more specifically for the details about the history of DarkHex. The Introduction has been rewritten based on his or her review.
