a hierarchical approach to computer hexnilufer/classes/cs5811/2003... · a hierarchical approach to...

20
Artificial Intelligence 134 (2002) 101–120 A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA Abstract Hex is a beautiful game with simple rules and a strategic complexity comparable to that of Chess and Go. The massive game-tree search techniques developed mostly for Chess and successfully used for Checkers and a number of other games, become less useful for games with large branching factors like Hex and Go. In this paper, we describe deduction rules, which are used to calculate values of complex Hex positions recursively starting from the simplest ones. We explain how this approach is implemented in HEXY—the strongest Hex-playing computer program, the Gold medallist of the 5th Computer Olympiad in London, August 2000. 2001 Elsevier Science B.V. All rights reserved. Keywords: Hex; Game programming; Theorem proving 1. Hex and its history The game of Hex was invented by the Danish poet and mathematician P. Hein. He introduced the game in 1942 in a lecture to students at the Niels Bohr Institute for Theoretical Physics. The game soon became popular in Denmark under the name of Polygon. It was independently reinvented by J. Nash in 1948 when he was a graduate student at Princeton University. Parker Brothers marketed a version of the game in 1952 under the name Hex. The game was presented to the general public by M. Gardner in Scientific American (see [12,13]). Hex is a two-player game played on a rhombic board with hexagonal cells (see Fig. 1). The classic board is 11 × 11, but it can be any size. The 10 × 10, 14 × 14 and even 19 × 19 board sizes are also popular. The players, Black and White, take turns placing pieces of their color on empty cells of the board. Black’s objective is to connect the two opposite black sides of the board with a chain of black pieces. White’s objective is to connect the two opposite white sides of the board with a chain of white pieces (see Fig. 1). The player moving first has a big advantage in Hex. In order to equalize chances, players often employ E-mail address: [email protected] (V.V. Anshelevich). 0004-3702/01/$ – see front matter 2001 Elsevier Science B.V. All rights reserved. PII:S0004-3702(01)00154-0

Upload: others

Post on 27-Jun-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

Artificial Intelligence 134 (2002) 101–120

A hierarchical approach to computer Hex

Vadim V. Anshelevich1200 Navaho Trail, Richardson, TX 75080, USA

Abstract

Hex is a beautiful game with simple rules and a strategic complexity comparable to that of Chessand Go. The massive game-tree search techniques developed mostly for Chess and successfully usedfor Checkers and a number of other games, become less useful for games with large branching factorslike Hex and Go. In this paper, we describe deduction rules, which are used to calculate values ofcomplex Hex positions recursively starting from the simplest ones. We explain how this approach isimplemented in HEXY—the strongest Hex-playing computer program, the Gold medallist of the 5thComputer Olympiad in London, August 2000. 2001 Elsevier Science B.V. All rights reserved.

Keywords: Hex; Game programming; Theorem proving

1. Hex and its history

The game of Hex was invented by the Danish poet and mathematician P. Hein. Heintroduced the game in 1942 in a lecture to students at the Niels Bohr Institute forTheoretical Physics. The game soon became popular in Denmark under the name ofPolygon. It was independently reinvented by J. Nash in 1948 when he was a graduatestudent at Princeton University. Parker Brothers marketed a version of the game in 1952under the name Hex. The game was presented to the general public by M. Gardner inScientific American (see [12,13]).

Hex is a two-player game played on a rhombic board with hexagonal cells (see Fig. 1).The classic board is 11 ×11, but it can be any size. The 10 ×10, 14 ×14 and even 19 ×19board sizes are also popular. The players, Black and White, take turns placing pieces oftheir color on empty cells of the board. Black’s objective is to connect the two oppositeblack sides of the board with a chain of black pieces. White’s objective is to connect thetwo opposite white sides of the board with a chain of white pieces (see Fig. 1). The playermoving first has a big advantage in Hex. In order to equalize chances, players often employ

E-mail address: [email protected] (V.V. Anshelevich).

0004-3702/01/$ – see front matter 2001 Elsevier Science B.V. All rights reserved.PII: S0004-3702(01)0 01 54 -0

Page 2: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

102 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

Fig. 1. The chain of black pieces connects black boundaries. Black has won the game.

a “swap” rule where the second player has the option of taking the first player’s openingmove. Despite the simplicity of the rules, the game’s strategic and tactical ideas are richand subtle. An introduction to Hex strategy and tactics can be found in the book by Browne[7].

The game can never end in a draw. This follows from the fact that if all cells of theboard are occupied, then a winning chain for Black or White must exist. While this two-dimensional topological fact seems obvious, it is not at all trivial. In fact, Gale [11]demonstrated that this result is equivalent to the Brouwer fixed-point theorem for 2-dimensional squares. It follows that there exists a winning strategy either for the firstor second player. Using a “strategy stealing” argument (cf. [5]), Nash showed that awinning strategy exists for the first player. However, this is only a proof of existence,and it does not provide any clues that can help the first player to win. One can findmany examples of opening positions on small boards up to 6 × 6 (including all one-stone positions) with indications of which player has a winning strategy at the web site:http://www.cs.ualberta.ca/∼queenbee/openings.html.

Even and Tarjan [10] showed that the problem of determining which player has awinning strategy in a generalization of Hex, called the Shannon switching game onvertices, is PSPACE complete. Reisch [17] later proved this for N × N Hex itself.

A Hex-playing machine was built by Shannon and Moore [20]. Shannon associated atwo-dimensional electrical charge distribution with any given Hex position. This machinemade decisions based on properties of the corresponding potential field. We acknowledgethat our work is greatly inspired by the beauty of Shannon’s original idea.

Although the rules of Hex are simple, the game requires deep strategic understandingand sharp tactical skills. The massive game-tree search techniques developed over the last30 to 40 years mostly for Chess (see [1,8]), and successfully used for Checkers [19] anda number of other games, become less useful for games with large branching factors likeHex and Go. For a classic 11 × 11 Hex board, the average number of legal moves is about100 (cf. 38 for Chess [14] and 8 for Checkers [19]).

Combinatorial Game Theory provides very powerful tools for the analysis of sums oflarge numbers of relatively simple games (see [5,9]). It is also useful in situations wherecomplex positions can be decomposed into sums of simpler ones. In particular, this method

Page 3: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120 103

is applicable to an analysis of Go endgames [6,16]. Although Hex positions do not tend todecompose into sums of local sub-games, many Hex positions can still be considered ascombinations of simpler sub-games.

In this article, we concentrate on the hierarchy of Hex sub-games, define a set ofdeduction rules, and demonstrate how these deduction rules can be used to calculatevalues of complex sub-games recursively, starting from the simplest ones. Integrating theinformation about sub-games of this hierarchy, we build an evaluation function foreseeingthe potential of Hex positions many moves ahead. This approach is implemented in HEXY,currently the strongest Hex-playing computer program. It won the gold medal of the 5thComputer Olympiad in London, August 2000. HEXY does not perform massive game-treesearch. Instead, the program focuses on a deep analysis of the sub-games hierarchy for arelatively small number of game positions. A Windows version of the program is publiclyavailable at http://home.earthlink.net/∼vanshel.

The course of the article is as follows. Section 2 discusses the concept of virtualconnections. In Section 3 we describe the AND and OR deduction rules, and in Section 4we define the H-search process for the hierarchical calculation of virtual connections.Subsequently, Section 5 presents an electrical resistor circuit model, which is used tocombine information about the hierarchy of virtual connections into a global evaluationfunction. In Section 6 we explain how this approach is implemented in HEXY. The majorideas of this work were presented earlier in [2,3].

2. Virtual connections and virtual semi-connections

In Sections 2, 3, and 4 we characterize Hex positions from Black’s point of view.White’s point of view can be considered in a similar way. We consider the four polygonalboundary bands as additional cells (see Fig. 2) and assume that the black boundary cellsare permanently occupied by black pieces, and the white boundary cells are permanentlyoccupied by white pieces.

Consider the two diagrams in Fig. 2. In both positions White cannot prevent Black fromconnecting the two groups of black pieces, x and y , even if White moves first, since thereare two empty cells a and b adjacent to both x and y . If White occupies one of those emptycells, then Black can play the other. Note that the black connection between groups x andy is secured as long as the two cells a and b remain empty. In this type of position we saythat the groups of black pieces x and y form a two-bridge. In a battle, where Black tries

Fig. 2. The groups of black pieces (x and y) form a two-bridge.

Page 4: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

104 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

to connect the groups x and y , and White tries to prevent it, the result is predictable twomoves ahead. This provides an important advantage to Black. In the position on the left,this advantage is local. In the position on the right this advantage is decisive, the groupsare connected to the black boundaries, and White should resign.

Before generalizing the two-bridge concept, we introduce two notions. First, we define acell to be black if it is occupied by a black piece; second, we refer to a group of connectedblack cells as a single black cell. The following three definitions generalize the two-bridgeconcept.

Definition 1. Let x and y be two different cells, and let A be a set of empty cells of a givenposition. We assume that x /∈ A and y /∈ A. Consider the triplet (x,A,y) as a sub-game,where Black tries to connect cells x and y with a chain of black pieces, White tries toprevent it, and both players can put their pieces only in cells of A. We then define x and y

as ends of the sub-game, and A as its carrier.

Definition 2. A sub-game is a virtual connection iff Black has a winning strategy even ifWhite moves first.

Definition 3. A sub-game is a virtual semi-connection iff Black has a winning strategymoving first, and does not have one if he moves second.

We represent virtual connections and virtual semi-connections with diagrams as inFig. 3. In both cases we see black-black, black-empty, and empty-empty ends. The blankrectangles stand for carriers of virtual connections. The crossed rectangles stand for carriersof virtual semi-connections.

In practice, it is more convenient to use the following recursive definitions.

Definition 2a. A sub-game is a virtual connection iff for every white move there exists ablack move such that the resulting sub-game is a virtual connection.

Definition 3a. A sub-game is a virtual semi-connection iff it is not a virtual connection,and there exists a black move such that the resulting sub-game is a virtual connection.

Assume that in a given position with a virtual connection, White moves first. The numberof moves which must be made in order for Black to win this sub-game, under the conditionthat Black tries to minimize this number and White tries to maximize it, characterizesthe depth of the virtual connection. In other words, the depth of the virtual connection

Fig. 3. Diagrams of virtual connections (left) and virtual semi-connections (right).

Page 5: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120 105

is the depth of a game-tree search required to establish this virtual connection. Virtualconnections with depth d contain information about the nodes of the game tree associatedwith the Hex position d moves ahead.

Four remarks are in order:• A pair of neighboring cells forms a virtual connection with an empty carrier. The

depth of this virtual connection is equal to zero.• A two-bridge forms a virtual connection of depth two.• The ends x and y can form virtual connections with several different carriers. The

virtual connection (x,A,y) is minimal iff there does not exist a virtual connection(x,B,y) such that B ⊂ A and B �= A. If a sub-game (x,A,y) is a virtual connectionand (x,C,y) is a sub-game such that A ⊂ C, then the sub-game (x,C,y) is alsoa virtual connection. This is why we are primarily interested in minimal virtualconnections.

• A special role is played by a winning virtual connection formed by the additionalboundary cells. If it exists, then there exists a global winning strategy for Black evenif White moves first.

In Figs. 4 and 5 one can see four typical samples of virtual connections and virtual semi-connections.

In each diagram of Fig. 4 the cell y is formed by the black piece connected to the bottomright black boundary. The cells of their carriers are marked white. The characterization isas follows.

(1) An “edge connection” from the fourth row. Depth = 10.(2) A “ladder”. Depth = 14.(3) A chain of two-bridges. Depth = 12.(4) This virtual connection will be analyzed in Section 3. Depth = 6 (see Fig. 8).

Fig. 4. Black cells x and y form virtual connections.

Page 6: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

106 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

Fig. 5. Black cells x and y form virtual semi-connections.

In the four diagrams of Fig. 5 we see four samples of virtual semi-connections. Thecells of their carriers are marked white. Diagram 4 shows the initial position. According toNash’s theorem mentioned in Section 1, the initial position is a virtual semi-connection.

3. Deduction rules

In this section we define two deduction rules, which can be used to build complex virtualconnections starting from the simplest ones.

The AND Deduction Rule. Let sub-games (x,A,u) and (u,B,y) be two virtualconnections, with common end u and different ends x �= y . We assume that x /∈ B , y /∈ A,and A ∩ B = ∅.

(i) If u is black, then the sub-game (x,A ∪ B,y) is a virtual connection.(ii) If u is empty, then the sub-game (x,A ∪ u ∪ B,y) is a virtual semi-connection.

Proof. (i) Since A ∩ B = ∅, White cannot attack both virtual connections simultaneously.Assume that White occupies a cell a ∈ A. Since the sub-game (x,A,u) is a virtualconnection, there exists a cell b ∈ A, where Black can play to create a new virtualconnection (x,A′, u). The new carrier A′ is obtained from A by removing two cells a

and b. (Note that the new virtual connection belongs to a position different from theoriginal one). In short, if White occupies a cell in A, then Black can restore the first virtualconnection by moving to an appropriate cell of A. The same is true for B , and thus theresult follows by induction.

(ii) If the cell u is empty, then Black can occupy this cell, and case (ii) is reduced tocase (i). ✷

Fig. 6 shows a graphical representation of this deduction rule.

Page 7: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120 107

Fig. 6. The AND Deduction Rule.

Fig. 7. The OR Deduction Rule.

The OR Deduction Rule. Let sub-games (x,Ak, y) (k = 1,2, . . . , n, for n > 1) withcommon ends x and y be virtual semi-connections. If

n⋂k=1

Ak = ∅,

then the sub-game (x,A,y), where

A =n⋃

k=1

Ak,

is a virtual connection.

Proof. If White occupies a cell a ∈ Ai , then there exists a different carrier Aj , such thata /∈ Aj , and Black can move to Aj to convert virtual semi-connection (x,Aj , y) to a virtualconnection. ✷

Fig. 7 graphically represents this deduction rule for n = 3.Fig. 8 demonstrates how the AND and OR deduction rules can be used for proving

virtual connections. Diagram 1 of Fig. 8 represents the sub-game on the board. Thesequence of transformations in Diagrams 2 through 6 graphically demonstrates theapplication of the AND and OR deduction rules, and proves that Black has a winningposition, even if White moves first.

Diagram 3 is obtained from Diagram 1 by applying the AND Deduction Rule six timesand then the OR Deduction Rule three times. Diagram 4 results from the AND DeductionRule. The winning virtual connection in Diagram 6 follows from applying the ANDDeduction Rule two times and a final application of the OR Deduction Rule.

Page 8: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

108 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

Fig. 8. The use of AND and OR deduction rules.

4. H-search

The AND and OR deduction rules introduced in Section 3 are used to define thefollowing hierarchical algorithm for the calculation of virtual connections.

H-search. Consider some initial set of virtual connections and semi-connections as thefirst generation of virtual connections and semi-connections. In particular, this initial setmight consist of the simplest virtual connections, namely all pairs of neighboring cells. Byapplying the AND and OR deduction rules to the appropriate groups of the first generationof virtual connections and semi-connections, we build the second generation of virtualconnections and semi-connections. Then we apply the AND and OR deduction rules toboth the first and the second generations of virtual connections and semi-connectionsto build the third generation of virtual connections and semi-connections, etc. Thisprocess stops when either no new virtual connections are produced or the winning virtualconnection is built.

We consider that to some extent this process is analogous to automatic theorem proving(see for example [18]). Appendix A contains a skeleton of an algorithm representing theH-search for calculation of virtual connections.

H-search can build all of the virtual connections shown in Figs. 2 and 4. Section 3explained the case of the sub-game of Diagram 4 in Fig. 4. Formal proofs for the sub-games of Diagrams 1 and 2 in Fig. 4 are given in Appendix B. In Appendix C we analyzehow H-search works in case of two simple examples of virtual connections containing alarge parameter.

We emphasize that H-search is not another version of the usual game-tree search.H-search and game-tree search use different representations of the problem and, as aresult, they search in different spaces. In particular, H-search performs a search for virtualconnections in the set of sub-games of a Hex position.

The question now arises: is the set of the AND and OR deduction rules complete, i.e.,can H-search build all virtual connections starting from the simplest ones? The answeris no. Fig. 9 shows a counter-example. It represents a virtual connection that cannot bebuilt by H-search. It is easy to check that this sub-game is a virtual connection. Indeed, ifWhite plays at a, Black can reply with b, forcing White to occupy c. Then Black playsd securing the win. This virtual connection is formed by two equivalent virtual semi-

Page 9: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120 109

Fig. 9. The two black cells form a virtual connection, which cannot be built using the AND and OR deductionrules.

connections with disjoint carriers connected in parallel. A computer program was used toverify that no combination of the AND and OR deduction rules can establish these virtualsemi-connections or the overall virtual connection.

In addition to the above, we remark that the AND and OR deductions rules can begeneralized in a way that makes them complete [2]. However, to the best of our knowledge,generalized H-search has not been implemented so far, and its practical value is not clear.

5. Evaluation function and electrical resistor circuits

In practice, due to limited computing resources, both H-search and game-tree search arecapable of discovering a winning virtual connection either on small boards or in endgames.A game-tree search for a winning strategy (a winning virtual connection in the case ofHex) is usually replaced by the search for the minimax value of some heuristic functionon a smaller graph, where computations are still feasible. In the case of H-search, thesituation is similar. Even if it is impossible to build the winning virtual connection forBlack or for White due to incompleteness of the AND and OR deduction rules and/orthe limited computing resources, the set of discovered virtual connections provides usefulinformation for the evaluation of the entire position. In this section we introduce a family ofevaluation functions based on an electrical resistor circuit representation of Hex positions.The evaluation functions combine information about the hierarchy of discovered virtualconnections.

One can think of an electrical circuit as a graph. Edges of the graph play the role ofelectrical links (resistors). The resistance of each electrical link is equal to the length of thecorresponding edge of the graph. Here, we see that the “electrical circuit” language bettersuits our needs. With every Hex position, we associate two electrical circuits. The first onecharacterizes the position from Black’s point of view (Black’s circuit), and the second onecharacterizes the position from White’s point of view (White’s circuit). To every cell c ofthe board we assign a resistance r in the following way.

For Black’s circuit:

rB(c) =

1 if c is empty,

0 if c is occupied by a black piece,

+∞ if c is occupied by a white piece.

Page 10: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

110 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

For White’s circuit:

rW(c) =

1 if c is empty,

0 if c is occupied by a white piece,

+∞ if c is occupied by a black piece.

For each pair of neighboring cells, (c1, c2), we associate an electrical link with resis-tance:

rB(c1, c2) = rB(c1) + rB(c2) for Black’s circuit,

rW(c1, c2) = rW(c1) + rW(c2) for White’s circuit.

In the first instance, the circuits only take into account connections between neighboringcells. We will enhance these circuits by incorporating information about the hierarchy ofdiscovered virtual connections. Below we focus on Black’s circuits only. White’s circuitscan be dealt with in a similar way.

Our first approach was to add an additional electrical link to Black’s circuit between twocells x and y if x and y form a virtual connection. Consequently, all virtual connectionswould be treated as neighboring cells. However, virtual connections between nearestneighbors are stronger than other virtual connections. So, our circuit should reflect this.Thus, we made the resistance between the ends of all other virtual connections higher thanbetween two nearest neighbors.

In the second approach we added other links to Black’s circuit in the following way. Iftwo black cells x and y form a virtual connection and an empty cell c is a neighbor of oneof the ends of the virtual connection, say x , we then treat cell c also as a neighbor of theother end y . This means that we connect cells c and y with an additional electrical link inthe same way as the actual neighbors. (We have tried both approaches, but we do not haveconclusive data to suggest which one is better.)

Let RB and RW be distances between black boundaries in Black’s circuit and whiteboundaries in White’s circuit, correspondingly. Now we define an evaluation functionE as

E = log(RB/RW).

A reasonable distance metric is the length of the shortest path on the graph connectingboundaries. However, distances can be measured in different ways. Following Shannon’sidea, we applied an electrical voltage to the opposite boundaries of the board and measuredthe total resistance between them, RB for Black’s circuit and RW for White’s circuit (seeFig. 10). This idea was implemented by C.E. Shannon in a robot which played the gameBird Cage, also known as the game of Gale or Bridg-it (see [13]).

We prefer this method for measuring distances because according to the Kirchhoffelectrical current laws, the total resistance takes into account not only the length of theshortest path, but also all other paths connecting the boundaries, their lengths, and theirintersections. Yet, our choice for this measure is not as important as the depths of the virtualconnections included in the circuit. Virtual connections with a depth d contain informationabout the nodes of the game tree associated with the evaluation of the Hex position d

moves ahead. Thus, we can expect that by including electrical links that correspond to

Page 11: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120 111

Fig. 10. Black’s and White’s circuits.

virtual connections with a depth less than or equal to d , we obtain an evaluation functionwith predicting abilities up to d moves ahead.

6. HEXY plays Hex

HEXY is a Hex-playing computer program, which uses the ideas presented above. Itruns on a standard PC with Windows, and can be downloaded from the website: http://home.earthlink.net/∼vanshel.

As shown in Section 4, there exist virtual connections that cannot be discovered by H-search. This means that H-search cannot serve as an alternative to the game-tree search.Therefore, HEXY uses a combined algorithm, mixing both methods in the proportiondescribed below.

HEXY uses a selective alpha-beta search algorithm with the evaluation functionsdescribed in Section 5. For every node to be evaluated HEXY calculates the hierarchyof the virtual connections for both Black’s and White’s circuits using H-search. ThenHEXY calculates the evaluation function based on resistances RB and RW between Blackand White boundaries, correspondingly. To calculate the electrical resistance betweenboundaries, HEXY solves the Kirchhoff system of linear equations for electric potentialusing a method of iterations (see, for example, [21]). The solution is used for move orderingtoo. For every empty cell of the board, the program calculates an energy, which dissipateson all links adjacent to this cell. Moves played in the cells with a higher energy have ahigher priority.

In practice, HEXY rarely uses pairs of neighboring cells as the initial set for H-search,but looks for changes in the hierarchy of the virtual connections caused by an additionalpiece placed on the board. The program keeps track of the available minimal virtualconnections and semi-connections.

The program has several important thresholds, which control the run time and theamount of memory required. Since the major objective was the creation of a Hex-playingprogram that provides fun for Hex fans, we imposed the condition that HEXY should beable to complete a game on the 10 × 10 board within 8 minutes on a standard PC with

Page 12: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

112 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

300 MHz processor and 32 MB RAM. This means that Hexy should not spend morethan 10 to 20 seconds per move. Thus, we tried to maximize the playing strength byfinding optimal values of the thresholds, satisfying the above condition. This was doneexperimentally. During our experiments we compared the playing strength of differentversions of the program applying the following methodology. We selected five first moves,which we considered as neutral, and played one version of the program against another ina 10-game match. Each starting position was played twice, allowing each program to enjoythe first move (no swap was allowed). If one of the programs won at least eight games outof ten, we decided that this program was superior. Otherwise, we considered the result ofthe match as being inconclusive.

The most important thresholds are D and M . The parameter D is the depth of the game-tree search. The parameter M sets a limit on the number of different minimal virtualconnections with the same ends built by the program. This threshold indirectly controlsthe total number of calculated minimal virtual connections. The larger M is, the moreminimal virtual connections H-search builds for every node of the game-tree. However, wedo not put any limits on the number of iterations of the algorithm or on the total number ofvirtual connections and their depths or on the total processing time. H-search stops wheneither no new virtual connections are produced or the winning virtual connection has beenbuilt.

There is a trade-off between the parameters D and M , and finding an optimum is animportant task. Experiments show that the dependence of HEXY’s playing strength on theparameter M is much more significant than its dependence on the depth D of the game-tree search. The best results are obtained with D = 3 and M = 20 (for the 10 × 10 board).In particular, this version of HEXY (called Advanced Level) is significantly stronger thanthe one with D = 6 and M = 0 (M = 0 means that no virtual connections except pairsof neighboring cells are calculated). Advanced Level performs a shallow game-tree search(200–500 nodes per move), yet it calculates many dozens of virtual connections and manyhundreds of virtual semi-connections per node. This version of HEXY routinely detectsvirtual connections with depth 20 or more, which means that the program foresees somelines of play 20 or more moves ahead. In particular, HEXY routinely discovers the winningvirtual connection 20 or more moves prior to the actual end of the game. (The fact that thetypical maximal depth of calculated virtual connections is approximately equal to 20 aswell as the chosen value for M is a pure coincidence.)

Another threshold, K , sets the limit for the number of virtual semi-connections on theinput side of the OR deduction rule. It is selected in the range 4 to 5. No other H-searchpruning or filtering is applied.

HEXY demonstrates a clear superiority over all known Hex-playing computer programs.In particular, we compare HEXY with the program QUEENBEE by J. van Rijswijck(University of Alberta GAMES group). In contrast to HEXY, this program exploits amassive game-tree search, with a computationally inexpensive evaluation function (see[22]). QUEENBEE uses the iterative-deepening alpha-beta search enhanced with MinimalWindow/Principal Variation Search and transposition tables. QUEENBEE’s search alsoincorporates the fractional-ply searching ideas of the “Sex Search algorithm” [15]. Thecomparison of HEXY with QUEENBEE was performed for the boards 7 × 7, 10 × 10and 11 × 11, using the same methodology and criteria as the ones used for comparison

Page 13: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120 113

of different versions of HEXY. On all these boards, HEXY demonstrated superiority. Theprograms also faced each other in the Hex tournament of the 5th Computer Olympiad inLondon, 2000. HEXY defeated QUEENBEE with four wins, no losses [4]. (According tothe Olympiad rules, each program had 30 minutes for a game on the 11 × 11 board. Theparameters of HEXY were adjusted in order to meet these requirements. Since HEXY didnot use any opening book, 40 percent of the available time was allocated for the first fourmoves.)

HEXY has also been tested on the 10 × 10 board against human players on the populargame website Playsite (http://www.playsite.com/games/board/hex). The provisional con-clusion is that HEXY cannot compete on an equal footing with the best human players.Nevertheless, after more than 100 games, the program achieved a rating that is within thehighest Playsite rating range.

7. Conclusion

In this paper we described a hierarchical approach to the game of Hex and explainedhow this approach is implemented in HEXY, currently the strongest Hex-playing computerprogram. We have concentrated on the hierarchy of virtual connections, and have definedthe AND and OR deduction rules used to build complex virtual connections recursivelystarting from the simplest ones. Integrating the information about virtual connectionsof this hierarchy, we built an evaluation function capable of predicting the potential ofHex positions many moves ahead. The process of discovering virtual connections, H-search, is computationally expensive. Nevertheless, the resulting far-sighted abilities ofthe evaluation function greatly outweigh its computational cost.

Appendix A

Below we present a skeleton of a brute-force algorithm, which implements H-search forthe calculation of Black’s virtual connections (VC) and virtual semi-connections (VSC).The algorithm deals with the following data structures:

• G—a list of black and empty cells of the board. A group of connected black cells isconsidered as a single cell.

• C(g1, g2)—a list of carriers of VCs with ends g1 and g2 for every g1, g2 ∈ G.• SC(g1, g2)—a list of carriers of VSCs with ends g1 and g2 for every g1, g2 ∈ G.

If we start from the simplest virtual connections, then initially these lists contain onlynearest neighbors:

• C(g1, g2) = ∅, if g1 and g2 are not nearest neighbors,• C(g1, g2) contains just empty carrier ∅, if g1 and g2 are nearest neighbors.• SC(g1, g2) = ∅ for all g1 and g2.

In general, we can start from any lists of VCs and VSCs. This is useful when we look forchanges in these lists caused by an additional piece placed on the board.

The procedure H-SEARCH recursively calculates VCs and VSCs starting from the onespresent in the lists C(g1, g2) and SC(g1, g2), and updates all of these lists at each step of

Page 14: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

114 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

the algorithm. We consider a VC as new one if it has been produced at the current or at theprevious step of the algorithm.

PROCEDURE: H-SEARCH

WHILE (there is at least one new VC):LOOP1 over g ∈ G

LOOP2 over g1, g2 ∈ G such that:g1 �= g2,at least one of the lists C(g1, g) or C(g2, g) contains at least one new carrier.If g is black then, additionally, g1 and g2 should be both empty.

LOOP3 over c1 ∈ C(g1, g) and c2 ∈ C(g2, g) such that:At least one of the carriers c1 or c2 is new,c1 ∩ c2 = ∅,g1 /∈ c2 and g2 /∈ c1.

IF (g is black)c = c1 ∪ c2. // the AND Deduction RuleUPDATE C(g1, g2) with c.

ELSEsc = c1 ∪ g ∪ c2. // the AND Deduction RuleUPDATE SC(g1, g2) with sc.IF (the last UPDATE is successful)

APPLY_THE_OR_DEDUCTION_RULE_AND_UPDATE(C_SET = C(g1, g2),SC_SET = SC(g1, g2) − sc,UNION = sc,INTERSECTION = sc )

END of IFEND of IF

END of LOOP3END of LOOP2

END of LOOP1END of WHILE

END of PROCEDURE

The recursive procedure APPLY_THE_OR_DEDUCTION_RULE_AND_UPDATEhas four parameters: C_SET, SC_SET, UNION and INTERSECTION.

PROCEDURE: APPLY_THE_OR_DEDUCTION_RULE_AND_UPDATE(C_SET = C, SC_SET = SC, UNION = u, INTERSECTION = i )

LOOP over sc1 ∈ CSu1 = u ∪ sc1,i1 = i ∩ sc1.IF (i1 = ∅) // the OR Deduction Rule

UPDATE C with u1

Page 15: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120 115

ELSEAPPLY_THE_OR_DEDUCTION_RULE_AND_UPDATE (C_SET = C,

SC_SET = SC − sc1, UNION = u1, INTERSECTION = i1 )END of IF

END of LOOPEND of PROCEDURE

Appendix B

Below we show how to prove the virtual connections of Fig. B.1 (cf. Fig. 4, Diagrams1 and 2) using the AND and OR deduction rules. In each diagram the cell y is formedby the black boundary. The cells of the carriers are enumerated. Diagram 1 is an “edgeconnection” from the fourth row and Diagram 2 is a “ladder”.

We use abbreviation VC for virtual connection, VSC for virtual semi-connections,square brackets [] for carriers, and parentheses () for sub-game triplets.

Examples.[a, b] is a carrier consisting of two cells a and b.[] is an empty carrier.(x, [a, b, c, d], y) is a sub-game with ends x and y and carrier [a, b, c, d].(x, [], y) is a sub-game with ends x and y and an empty carrier.

The “edge connection” from the fourth row

The following sequence of deductions proves this virtual connection.

(x,[],16) is VC, (16,[],15) is VC. Apply AND: (x,[16],15) is VSC.(x,[],19) is VC, (19,[],15) is VC. Apply AND: (x,[19],15) is VSC.(x,[16],15) is VSC, (x,[19],15) is VSC. Apply OR: (x,[16,19],15) is VC.

(15,[],9) is VC, (9,[],8) is VC. Apply AND: (15,[9],8) is VSC.(15,[],14) is VC, (14,[],8) is VC. Apply AND: (15,[14],8) is VSC.(15,[9],8) is VSC, (15,[14],8) is VSC. Apply OR: (15,[9,14],8) is VC.

Fig. B.1. Black cells x and y form virtual connections.

Page 16: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

116 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

(8,[],1) is VC, (1,[],y) is VC. Apply AND: (8,[1],y) is VSC.(8,[],2) is VC, (2,[],y) is VC. Apply AND: (8,[2],y) is VSC.(8,[1],y) is VSC, (8,[2],y) is VSC. Apply OR: (8,[1,2],y) is VC.

(10,[],3) is VC, (3,[],y) is VC. Apply AND: (10,[3],y) is VSC.(10,[],4) is VC, (4,[],y) is VC. Apply AND: (10,[4],y) is VSC.(10,[3],y) is VSC, (10,[4],y) is VSC. Apply OR: (10,[3,4],y) is VC.

(15,[],10) is VC, (10,[3,4],y) is VC. Apply AND: (15,[3,4,10],y) is VSC.(15,[9,14],8) is VC, (8,[1,2],y) is VC. Apply AND: (15,[1,2,8,9,14],y) is VSC.(15,[3,4,10],y) is VSC, (15,[1,2,8,9,14],y) is VSC.Apply OR: (15,[1,2,3,4,8,9,10,14],y) is VC.

(11,[],4) is VC, (4,[],y) is VC. Apply AND: (11,[4],y) is VSC.(11,[],5) is VC, (5,[],y) is VC. Apply AND: (11,[5],y) is VSC.(11,[4],y) is VSC, (11,[5],y) is VSC. Apply OR: (11,[4,5],y) is VC.

(13,[],6) is VC, (6,[],y) is VC. Apply AND: (13,[6],y) is VSC.(13,[],7) is VC, (7,[],y) is VC. Apply AND: (13,[7],y) is VSC.(13,[6],y) is VSC, (13,[7],y) is VSC. Apply OR: (13,[6,7],y) is VC.

(17,[],12) is VC, (12,[],13) is VC. Apply AND: (17,[12],13) is VSC.(17,[],18) is VC, (18,[],13) is VC. Apply AND: (17,[18],13) is VSC.(17,[12],13) is VSC, (17,[18],13) is VSC. Apply OR: (17,[12,18],13) is VC.

(17,[],11) is VC, (11,[4,5],y) is VC. Apply AND: (17,[4,5,11],y) is VSC.(17,[12,18],13) is VC, (13,[6,7],y) is VC. Apply AND: (17,[6,7,12,13,18],y) is VSC.(17,[4,5,11],y) is VSC, (17,[6,7,12,13,18],y) is VSC.Apply OR: (17,[4,5,6,7,11,12,13,18],y) is VC.

(16,[],10) is VC, (10,[],9) is VC. Apply AND: (16,[10],9) is VSC.(16,[],15) is VC, (15,[],9) is VC. Apply AND: (16,[15],9) is VSC.(16,[10],9) is VSC, (16,[15],9) is VSC. Apply OR: (16,[10,15],9) is VC.

(9,[],2) is VC, (2,[],y) is VC. Apply AND: (9,[2],y) is VSC.(9,[],3) is VC, (3,[],y) is VC. Apply AND: (9,[3],y) is VSC.(9,[2],y) is VSC, (9,[3],y) is VSC. Apply OR: (9,[2,3],y) is VC.

(16,[],11) is VC, (11,[],12) is VC. Apply AND: (16,[11],12) is VSC.(16,[],17) is VC, (17,[],12) is VC. Apply AND: (16,[17],12) is VSC.(16,[11],12) is VSC, (16,[17],12) is VSC. Apply OR: (16,[11,17],12) is VC.

(12,[],5) is VC, (5,[],y) is VC. Apply AND: (12,[ 5],y) is VSC.(12,[], 6) is VC, (6,[],y) is VC. Apply AND: (12,[ 6],y) is VSC.(12,[5],y) is VSC, (12,[6],y) is VSC. Apply OR: (12,[5,6],y) is VC.

Page 17: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120 117

(16,[10,15],9) is VC, (9,[2,3],y) is VC. Apply AND: (16,[2,3,9,10,15],y) is VSC.(16,[11,17],12) is VC, (12,[5,6],y) is VC. Apply AND: (16,[5,6,11,12,17],y) is VSC.(16,[2,3,9,10,15],y) is VSC, (16,[5,6,11,12,17],y) is VSC.Apply OR: (16,[2,3,5,6,9,10,11,12,15,17],y) is VC.

(x ,[16,19],15) is VC, (15,[1,2,3,4,8,9,10,14],y) is VC.Apply AND: (x ,[1,2,3,4,8,9,10,14,15,16,19],y) is VSC.(x ,[],17) is VC, (17,[4,5,6,7,11,12,13,18],y) is VC.Apply AND: (x ,[4,5,6,7,11,12,13,17,18],y) is VSC.(x ,[],16) is VC, (16,[2,3,5,6,9,10,11,12,15,17],y) is VC.Apply AND: (x ,[2,3,5,6,9,10,11,12,15,16,17],y) is VSC.(x ,[1,2,3,4,8,9,14,15,16,19],y) is VSC.(x ,[4,5,6,7,11,12,13,17,18],y) is VSC.(x ,[2,3,5,6,9,10,11,12,15,16,17],y) is VSC.Apply OR: (x ,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],y) is VSC.QED

The “ladder”

The following sequence of deductions proves this virtual connection.

(3,[],a) is VC, (a,[],1) is VC. Apply AND: (3,[],1) is VC.

(3,[],1) is VC, (1,[],y) is VC. Apply AND: (3,[1],y) is VSC.(3,[],2) is VC, (2,[],y) is VC. Apply AND: (3,[2],y) is VSC.(3,[1],y) is VSC, (3,[2],y) is VSC. Apply OR: (3,[1,2],y) is VC.

(5,[],3) is VC, (3,[1,2],y) is VC. Apply AND: (5,[1,2,3],y) is VSC.(5,[],4) is VC, (4,[],y) is VC. Apply AND: (5,[4],y) is VSC.(5,[1,2,3],y) is VSC, (5,[4],y) is VSC. Apply OR: (5,[1,2,3,4],y) is VC.

(7,[],5) is VC, (5,[1,2,3,4,],y) is VC. Apply AND: (7,[1,2,3,4,5],y) is VSC.(7,[],6) is VC, (6,[],y) is VC. Apply AND: (7,[6],y) is VSC.(7,[1,2,3,4,5],y) is VSC, (7,[6],y) is VSC. Apply OR: (7,[1,2,3,4,5,6],y) is VC.

(9,[],7) is VC, (7,[1,2,3,4,5,6],y) is VC. Apply AND: (9,[1,2,3,4,5,6,7],y) is VSC.(9,[],8) is VC, (8,[],y) is VC. Apply AND: (9,[8],y) is VSC.(9,[1,2,3,4,5,6,7],y) is VSC, (9,[8],y) is VSC. Apply OR: (9,[1,2,3,4,5,6,7,8],y) is VC.

(11,[],9) is VC, (9,[1,2,3,4,5,6,7,8],y) is VC.Apply AND: (11,[1,2,3,4,5,6,7,8,9],y) is VSC.(11,[],10) is VC, (10,[],y) is VC. Apply AND: (11,[10],y) is VSC.(11,[1,2,3,4,5,6,7,8,9],y) is VSC, (11,[10],y) is VSC.Apply OR: (11,[1,2,3,4,5,6,7,8,9,10],y) is VC.

(13,[],11) is VC, (11,[1,2,3,4,5,6,7,8,9,10],y) is VC.Apply AND: (13,[1,2,3,4,5,6,7,8,9,10,11],y) is VSC.

Page 18: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

118 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

(13,[],12) is VC, (12,[],y) is VC. Apply AND: (13,[12],y) is VSC.(13,[1,2,3,4,5,6,7,8,9,10,11],y) is VSC, (13,[12],y) is VSC.Apply OR: (13,[1,2,3,4,5,6,7,8,9,10,11,12],y) is VC.

(x ,[],13) is VC, (13,[1,2,3,4,5,6,7,8,9,10,11,12],y) is VC.Apply AND: (x ,[1,2,3,4,5,6,7,8,9,10,11,12,13],y) is VSC.(x ,[],14) is VC, (14,[],y) is VC. Apply AND: (x ,[14],y) is VSC.(x ,[1,2,3,4,5,6,7,8,9,10,11,11,12,13],y) is VSC, (x ,[14],y) is VSC.Apply OR: (x ,[1,2,3,4,5,6,7,8,9,10,11,12,13,14],y) is VC.QED

Appendix C

Below we analyze how H-search works for two simple examples of virtual connectionspresented in Fig. C.1. Diagram 1 is a chain of n two bridges and Diagram 2 is a binary treewith n levels . Both virtual connections are shown with n = 4.

Both virtual connections have depth D = 2n, and both of them can be proven by H-search. The initial number of empty cells N is equal to 2n for the chain of two-bridges and2(2n − 1) for the binary tree.

Let Tn be the number of the AND and OR deduction rules, which H-search must applyin order to discover the virtual connections. We show that for both of them holds:

Tn = O(Nc

), (C.1)

where N is the number of cells in their carriers, and c stands for a positive constantindependent of n.

We characterize each cell of the chain of two bridges (see Fig. C.1) by its elevation, suchthat the lowest cell y has the elevation 0 and the highest cell x has the elevation 4n. Thenwe characterize each virtual connection and semi-connection belonging to this game with

Fig. C.1. Diagrams of virtual connections.

Page 19: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120 119

its height, equal to the difference of elevations between the higher and the lower ends ofthe virtual connection or semi-connection. The estimation (C.1) follows from a sequenceof simple observations.

(1) The heights of virtual connections and semi-connections produced by the ithiteration of H-search do not exceed hi = 2i .

(2) Since the heights of the virtual connections and semi-connections produced by theith iteration of H-search do not exceed hi , their number does not exceed vi = c1nhi ,where c1 is a constant independent of n.

(3) In case of a chain of two-bridges, H-search does not build more than two semi-connections with the same ends. Hence, the number of the AND and OR deductionrules applied by the (i + 1)th iteration of H-search does not exceed di = v2

i .(4) It follows from the observations (1)–(3) that the number of AND and OR deduction

rules applied by the first k iterations of H-search does not exceed c2n222k for large

k, where c2 is a constant independent of n.(5) The maximal height of the newly-discovered virtual connections doubles with each

iteration. Hence, the number of iterations k that are necessary to build a winningvirtual connection does not exceed log2(2n).

(6) Inequality (C.1) follows from observations (4) and (5).Now we estimate the number Tn for the binary tree. Two children of the root x (see

Fig. C.1) are the roots of two binary trees with n−1 levels. Hence, the following inequalityis true:

Tn � 2Tn−1 + c3,

where c3 is a constant independent of n. Applying the last inequality repeatedly, we obtain

Tn � 2n(T0 + c3),

which implies (C.1).

References

[1] G. Adelson-Velsky, V. Arlazarov, M. Donskoy, Algorithms for Games, Springer, Berlin, 1988.[2] V.V. Anshelevich, The Game of Hex: The Hierarchical Approach, Combinatorial Game Theory Work-

shop, MSRI, Berkeley, July 2000, http://www.msri.org/publications/ln/msri/2000/gametheory/anshelevich/1/index.html.

[3] V.V. Anshelevich, The game of Hex: An automatic theorem proving approach to game programming, in:Proc. AAAI-2000, Austin, TX, AAAI Press, Menlo Park, CA/The MIT Press, Cambridge, MA, 2000,pp. 189–194.

[4] V.V. Anshelevich, Hexy wins Hex tournament, ICGA J. 23 (3) (2000) 181–184.[5] E.R. Berlekamp, J.H. Conway, R.K. Guy, Winning Ways for your Mathematical Plays, Academic Press,

New York, 1982; 2nd Edition, A K Peters, Natick, MA, 2001.[6] E.R. Berlekamp, D. Wolfe, Mathematical Go: Chilling Gets the Last Point, A K Peters, Wellesley, MA,

1994.[7] C. Browne, Hex Strategy: Making the Right Connections, A K Peters, Natick, MA, 2000.[8] M. Campbell, A.J. Hoane Jr., F-h. Hsu, Deep blue, Artificial Intelligence 134 (2002) 57–83 (this issue).[9] J.H. Conway, On Numbers and Games, Academic Press, London, 1976; 2nd Edition, A K Peters, Natick,

MA, 2001.

Page 20: A hierarchical approach to computer Hexnilufer/classes/cs5811/2003... · A hierarchical approach to computer Hex Vadim V. Anshelevich 1200 Navaho Trail, Richardson, TX 75080, USA

120 V.V. Anshelevich / Artificial Intelligence 134 (2002) 101–120

[10] S. Even, R.E. Tarjan, A combinatorial problem which is complete in polynomial space, J. Assoc. Comput.Mach. 23 (4) (1976) 710–719.

[11] D. Gale, The game of Hex and the Brouwer fixed-point theorem, Amer. Math. Monthly 86 (1979) 818–827.[12] M. Gardner, The Scientific American Book of Mathematical Puzzles and Diversions, Simon and Schuster,

New York, 1959.[13] M. Gardner, The Second Scientific American Book of Mathematical Puzzles and Diversions, Simon and

Schuster, New York, 1961.[14] A.D. de Groot, Thought and Choice in Chess, Mouton Publishers, The Hague, Netherlands, 1965.[15] D.N.L. Levy, D. Broughton, M. Taylor, The SEX algorithm in Computer Chess, ICCA J. 12 (1) (1989)

10–21.[16] M. Müller, Decomposition search: A combinatorial games approach to game tree search, with applications

to solving Go endgames, in: Proc. IJCAI-99, Stockholm, Sweden, 1999, pp. 578–583.[17] S. Reisch, Hex ist PSPACE-vollständig, Acta Informatica 15 (1981) 167–191.[18] J.A. Robinson, An overview of mechanical theorem proving, in: R. Banerji, M. Mesarovic (Eds.),

Theoretical Approaches to Non-Numerical Problem Solving, Springer, New York, 1970, pp. 2–20.[19] J. Schaeffer, R. Lake, P. Lu, M. Bryant, Chinook: The World Man-Machine Checkers Champion, AI

Magazine 17 (1) (1996) 21–29.[20] C.E. Shannon, Computers and automata, Proceedings of Institute of Radio Engineers 41 (1953) 1234–1241.[21] G. Strang, Linear Algebra and Its Applications, Academic Press, New York, 1976.[22] J. van Rijswijck, Are Bees better than Fruitflies? (Experiments with a Hex Playing Program), in: H. Hamilton

(Ed.), AI’00: Advances in Artificial Intelligence, 13th Biennial Canadian Society for Computational Studiesof Intelligence (CSCSI) Conference, Springer, New York, 2000, pp. 13–25.