University of Alberta
Crafting a Hex Solver with Connection-Search and Expected-Work-Search
Abstract
dc:description.abstractHex is the 2-player alternate-turn perfect-information board game created by Piet Hein in 1942. The board is an m×n array of Hexagonal cells that forms a parallelogram, or a rhombus when m equals n. Each player owns two opposing edges of the board. On a turn, a player colors an empty cell. The winner is whoever joins their two edges with a path of their color. Connection Search refers to any Hex-specific method to find connections. Threat Pattern Search, proposed by Jack van Rijswijck in 2000, finds cells belonging to opponent threats. Hierarchical Search, proposed by Vadim Anshelevich in 2002, finds point-to-point connections. Expected Work Search (EWS) is the 2-player game tree search algorithm created by Owen Randall et alia in 2024. Combining features of Monte Carlo Tree Search and Proof Number Search, EWS guides search by considering both expected win rate and expected proof tree size. In this thesis, we show how to craft a simple Hex solver based on Connection Search and EWS. We start with a minimax solver that prunes moves based on move ordering, inferior move detection, and safe cell-to-cell connection strategies. We measure the importance of these features and add them to a game-agnostic version of EWS. The result is a 1,000-line Python program that solves 6×6 Hex states.
Degree
thesis:*- Name thesis:degree_name
- Master of Science
- Level thesis:degree_level
- Master's
- Grantor
- University of Alberta
- Year dc:date.issued
- 2025
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Chen, Xinyue
- Advisor dc:contributor.advisor
-
- Hayward, Ryan(Computing science)
Subjects
dc:subject × 4Rights
dc:rights- Statement dc:rights
-
- This thesis is made available by the University of Alberta Library with permission of the copyright owner solely for non-commercial purposes. This thesis, or any portion thereof, may not otherwise be copied or reproduced without the written consent of the copyright owner, except to the extent permitted by Canadian copyright law.
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- DOI dc:identifier.doi
- https://doi.org/10.7939/83220