Dominect: A Simple yet Deep 2-Player

Oswin Aichholzer1, Maarten Löffler2, Jayson Lynch3, Zuzana Masárová4, Joachim Orthaber1, Irene Parada5, Rosna Paul1, Daniel Perz1, Birgit Vogtenhuber1, and Alexandra Weinberger1

1Graz University of Technology, Austria; {oaich, ropaul, daperz, bvogt, aweinber}@ist.tugraz.at, [email protected] 2Utrecht University, the Netherlands; m.loffl[email protected] 3University of Waterloo, Canada; [email protected] 4IST Austria; [email protected] 5TU Eindhoven, the Netherlands; [email protected]

Abstract

In this work we introduce the perfect information 2-player game Dominect, which has recently been invented by two of the authors. Despite being a game with quite simple rules, Dominect reveals a surprisingly high depth of complexity. Next to the rules, this work comes with a webpage containing a print-cut-glue-and-play version of the game and further information. Moreover, we report on first results concerning the development of winning strategies, as well as a PSPACE-hardness result for deciding whether a given game position is a winning position.

Introduction and Game Description Dominect is a finite, deterministic perfect information 2-player game developed by Oswin Aichholzer and Maarten Löffler during the 33rd Bellairs Winter Workshop on Computational Geometry in 2018. It belongs to the class of connection games, where a typical goal is to form a path connecting two opposite sides of the game board; see for example [1, 8]. Prominent members of this class are Hex (aka Con-tac-tix), TwixT, and Tak. But many others like , Connect, Gale (aka Bridg-It), or the Shannon switching game are also rather popular, as games or mathematical puzzles or both. The name Dominect comes from Domino and Connect, as the tokens used to play have the shape of dominoes of ratio 2 × 1 and the goal is to create a connecting chain of dominoes of their own color. A connecting chain of a player is a path of touching dominoes of that player that connects two opposite sides of

Figure 1: Left: an empty 8 × 7 Dominect board. Right: a winning position for red. the board (left and right for the red player, top and bottom for the blue player). The first player to build a connecting chain will win the game. We next describe the rules of the game in more detail. The Rules of Dominect. Dominect is a two-player game that is played on a rectangular board of m × n squares, where the board size m, n ≥ 3 can vary. The left and right sides of the board are colored red (and called the red sides), and the top and bottom sides are colored blue (the blue sides). Each player gets an unlimited number of dominoes in their color (red and blue). A domino is 2 squares long and 1 square wide and can be placed horizontally or vertically (that is, covering 2 × 1 or 1 × 2 previously unoccupied neighboring squares of the board). The first player (red) starts by placing a red domino anywhere on the board. After that, it is the blue players turn to place a blue domino. Players alternate placing dominoes of their color as long as there are two neighbored empty squares and none of the players has won the game. The first player who completes a connecting chain of dominoes of their color wins, where a connecting chain is a path of dominoes of one color that touches both sides of the board of that color. Dominoes are touching each other, and thus form a path, if they are adjacent in either vertical, horizontal or diagonal direction. Especially, touching at a corner is sufficient for a connection. Note that during the game a domino can be placed in any valid place and orientation, and does not need to be connecting to previously placed dominoes. Only for a win, the relevant dominoes have to form a connecting chain. If neither player has won and no more valid moves are possible (there can be empty single squares left over) the game ends in a draw.

It might seem natural to play on quadratic boards, that is, boards where m = n. But it turns out that, at least for small such boards, the first player has an advantage. Actually, we can show that for quadratic boards of size at most 9 × 9, the first player can always force a win. (For larger boards, it is not yet known whether a winning strategy for the first player exists.) A variant that can equalize this disadvantage of the second player is to play on an n × (n − 1) board, where the first player hast to play the distance n.

Dominect is in several ways different from other popular connecting-games like Hex [4]: • A draw is possible, that is, there are situations, where no more valid move is possible, but still none of the players has created a connecting chain of their dominoes. The reason for this is that even when no valid move is possible anymore there can still be some unoccupied single squares left. Hex does not admit a draw [5,6]. • It is possible that a red connecting chain crosses a blue connecting chain, that is, both players could connect their board sides on the same board. The reason for this unusual behavior is that touching corners are sufficient to connect two dominoes. However, as the game ends as soon as one of the players has a connecting chain, such a situation will never occur during a regular game play. • Strategy stealing, an approach used to show that the second player cannot force a win for many games [2, 3], cannot be applied for Dominect. The reason is that each placed domino blocks several other potential domino placements (not only one). So giving one move away by placing a domino somewhere, as used in strategy stealing, can be a major obstacle and change the whole strategy.

Dominect Webpage. To make Dominect publicly available, we have set up a webpage for the game at https://dominect.ist.tugraz.at, which provides among other things a short introduction of the game, the rules, and a print-cut-glue-and-play version of the game for download (Illustrations of some of this material can be found in the appendix of this paper). Further, we have implemented the game on the free online tabletop game platform Tabletopia. We also plan to provide Dominect on the popular Tabletop simulator available on the gaming platform Steam.

In the remainder of this paper, we report on results concerning the development of winning strategies for Dominect as well as a PSPACE-hardness result for deciding whether a given game position is a winning position. We conclude with a short discussion on variants of Dominect. Winning Strategies and PSPACE-Hardness of Deciding Winning Positions For boards of size m × n with m ≤ 9 or n ≤ 8, we have a complete analysis whether one of the players can force a win (assuming that they both play perfectly). Table1 summarizes our findings. Detailed winning strategies that prove the entries of the table will be provided in a full version of this work. We next report on a basic approach that we developed and used to obtain these results. In the following, we assume w.l.o.g. that the red player just made a move (and has not yet won). We want to know for the resulting game position D if the red player can force a win, regardless of what the next moves of the blue player are. If yes, we call D a winning position (for the red player).

Let CL = C1 to CR = Ck be the k ≥ 2 red connected components (sets of red dominoes and board sides which are connected) in D, where CL and CR contain the left and right side of the board, respectively. Starting from D, a bridge-move is a valid red move that connects two components Ci , Cj. Two valid red moves are independent if they cannot be blocked simultaneously by a single blue domino, that is, if no covered square of one move is identical to or sharing an edge with a covered square of the other move. Hence, if we can find 2` pairwise independent bridge-moves in D and pair them in a way that after performing either move per pair, the red player has connected CL and CR, and if the blue player cannot connect in at most ` moves, then D is a winning position for the red player. We further mention here that the concept of independent bridge-moves can be generalized to recognize winning positions even if connecting some of the components takes two or more moves (see Figure2 for a taste). The results in Table1 can be obtained by using this generalization in combination with a careful analysis of different starting moves.

1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11

Table 1: Overview, which board sizes are a first Figure 2: Depicted first player winning strategy on player win (red), a second player win the 7 × 7 board (the starting move, a pair (blue), and a draw (gray) if both players of independent bridge-moves to the left, play perfectly. and a generalization thereof to the right).

In the full version of this work, we also show that given a game position D and a set of pairwise independent bridge-moves in D, one can efficiently compute whether D is a winning position in the above sense. This can also be used to develop an algorithm that identifies game positions from which one player can force a win even though D is not a winning position via pairwise independent bridge-moves. However, while a positive answer of this algorithm guarantees that a player can force a win, a negative answer does not imply that the player cannot force a win. We next reason that this situation is not avoidable, as deciding whether or not a player can force a win from a given game position is computationally hard. More precisely, deciding whether a given position in the generalized game in an n × n board is a winning position is PSPACE-complete, implying that it is NP-hard. To show this we reduce from the generalized version of Hex, which is PSPACE-complete [7]. In the reduction each Hex cell corresponds to a rectangular gadget of dominoes in which exactly one more domino can be placed. Placing hexagonal stones in the Hex grid creates essentially the same connections as placing dominoes of the same colors in the corresponding gadgets. Game Variants and Related Games As discussed in the first section of this paper, already the “classic” Dominect game comes in several variants in the sense that it can nicely be played on boards of different sizes. However, there are several variants that might be of theoretical interest and/or might be nice to play. We mention some of those variants here.

• Maker-Breaker Variant: The first player wins if they obtain a connecting chain, while the second player wins when no more move is possible and the first player did not obtain a connecting chain. In this variant, a connecting chain of the second player is not relevant, that is, does not lead to a win for the second player. Obviously, a draw is not possible in this variant. While possible strategies for the Breaker might deviate substantially from strategies for the “classic” game, the theory of winning positions applies to this variant as well. • Breaker-Maker Variant: Exchange the role of first and second player from the previous variant. • Three-Player Game Rhombinect: The board for three players is a triangular grid in the shape of a (not necessarily regular) hexagon with side lengths x, y, and z. The players place rhombus-shaped stones (two triangles with a common edge) onto that grid, where each stone again covers exactly two squares of the board; see the appendix for an illustration. – Variant 1: The first player who connects their two sides wins. We conjecture that for regular hexagonal boards, this will always result in a draw. – Variant 2: The first two players to connect their two sides win. It seems that for regular hexagonal boards, the first two players have an advantage in this variant. • Graph Generalization: The “game board” is a plane drawing of some planar graph, with two bounded faces marked for each player. A move consists of coloring two previously uncolored bounded faces that share an edge, with the player’s color. A player wins if they have colored a path of touching faces connecting the two marked faces of the player, where two faces are touching if they share a vertex of the graph; see the appendix for an example game. This generalization includes Dominect and Rhombinect.

Acknowledgements. Research on Dominect was partially carried out at the 33rd and 34th Bellairs Winter Workshops on Computational Geometry and the Austrian Computational Geometry Reunion Meeting 2020. We would like to thank all participants for the playful atmosphere. Research on this work has been partially supported by FWF grant W1230 (O.A., I.P., R.P., and A.W.); NSERC (J.L.); FWF grant Z 342-N31 (Z.M.); and FWF grant I 3340-N35 (I.P., D.P., and B.V.).

References [1] Wikipedia: Connection game. https://en.wikipedia.org/wiki/Connection_game. Accessed: 2021-02-15. [2] D. Blackwell and M. A. Girshick. Theory of games and statistical decisions. John Wiley and Sons, Inc., New York; Chapman and Hall, Ltd., London, 1954. [3] C. Browne. Hex Strategy: Making the Right Connections. CRC Press, 1st edition, 2000. [4] R. B. Hayward and B. Toft. Hex: The full story. CRC Press, 1st edition, 2019. [5] R. B. Hayward and J. van Rijswijck. Hex and combinatorics. Discrete Mathematics, 306(19):2515–2528, 2006. Creation and Recreation: A Tribute to the Memory of Claude Berge. [6] J. F. Nash. Some Games and Machines for Playing Them. RAND Corporation, Santa Monica, CA, 1952. [7] S. Reisch. Hex ist PSPACE-vollständig. Acta Informatica, 15:167–191, 1981. [8] L. Susskind and G. Hrabovsky. Connection Games: Variations on a Theme. CRC Press, 2005.