TL;DR
The authors present Solrex, the first automated solver for Reverse Hex (Rex), a "misère" version of the classic game Hex where the player who completes a connection loses. By adapting state-of-the-art search algorithms and proving new Rex-specific pruning theorems, the team successfully solved all board positions up to 6×6, turning a game once thought "too complex" into a computationally solved problem.
What Problem Does This Paper Address?
Hex is a mathematically elegant game: two players compete to connect opposite sides of a rhombic board of hexagons. It is famous because it cannot end in a draw. However, its "misère" variant—Reverse Hex (or Rex)—is a different beast entirely. In Rex, if you connect your two sides, you lose.
While the strategy for standard Hex is well-documented, Rex is notoriously counter-intuitive. Even legendary math communicator Martin Gardner once noted that the 4×4 Rex board was so complex that a winning line of play remained unknown. The challenge for an automated solver is that the heuristics used for Hex (like "virtual connections") don't apply. In Rex, adding your own stone to the board is generally a disadvantage, and games tend to last much longer because players are actively trying not to complete a path.
Methods
Solrex is built on the foundation of Solhex, a high-performance Hex solver, but required a ground-up rethink of game logic. Key components include:
- SP-DFPN Search: It uses Scalable Parallel Depth First Proof Number Search. This algorithm focuses the search on nodes that are most likely to "prove" or "disprove" a win/loss state.
- Rex-Specific Pruning: The authors proved several new theorems to discard "inferior" moves. For example, they established that in Rex, an uncolored cell is "dead" if it cannot contribute to a connection for either player. Pruning these reduces the search space significantly.
- Pairing Strategies: Instead of looking for winning paths, Solrex looks for "pairing strategies." If a player can ensure that for every pair of cells in a set, they only ever occupy at most one, they can force the opponent to eventually occupy the "losing" cells.
- Augmented H-Search: This is the "engine" of the solver. It’s a deduction algorithm used to find virtual connections. The authors modified it to find "pre-join-pairing" strategies—moves that essentially set a trap to force the opponent into a connection.
Datasets
The paper does not use external datasets. Instead, it evaluates Solrex against the complete state space of small Rex boards:
- 4×4 Boards: Specifically targeting the "1.Bd1" opening, which was the final unsolved 4×4 position in previous literature.
- 5×5 and 6×6 Boards: The authors used all unique opening moves (up to symmetry) on these board sizes as their primary benchmark suite.
Key Insights and Ideas
- The "Bad is Good" Paradox: In standard Hex, more stones are always better. In Rex, the authors prove (Theorem 2) that adding a stone of your own color is generally a disadvantage. This fundamental flip is why Rex solvers are harder to build than Hex solvers.
- H-Search is the MVP: The "knockout tests" (where features are turned off to see the impact) revealed that H-search is the most critical component. Without it, the solver was ~90 times slower on 5×5 boards. It is the primary tool for avoiding "combinatorial explosion."
- Rex is "Deeper" than Hex: The authors observed that Rex games are harder to solve than Hex games of the same size. In Hex, a winner can often be determined quickly through strong connections. In Rex, the loser can often force the winner to play until the board is nearly full, leading to much deeper search trees.
Key Results
- Full 6×6 Solution: Solrex solved all 18 unique 6×6 openings. The hardest single position took less than 4 hours on a quad-core machine, and the entire 6×6 suite was solved in about 7 hours.
- 4×4 Completion: The solver successfully found the winning line for the 1.Bd1 opening, effectively "closing" the 4×4 game.
- New Puzzles: The authors used the solver to discover three new Rex puzzles (shown in Figure 10), including one where the only winning move is a highly non-obvious placement.
- Efficiency: On 6×6 boards, Solrex is significantly faster than its predecessor Solhex was at similar scales, despite Rex being a theoretically "harder" game to prune.
Limitations and Future Work
- Scaling to 7×7: While 6×6 is solved, 7×7 and 8×8 remain daunting. The search space grows exponentially, and Rex lacks some of the powerful "permanently inferior cell" pruning rules that exist in standard Hex.
- Strategy Discovery: While the solver can find that a position is a win or loss, translating those complex proof trees into human-understandable strategies remains a challenge.
- Generalization: The authors suggest that the "pairing strategy" approach used here could be adapted for other connection games like Havannah or Twixt, which currently lack high-level automated solvers.
Summary updated