Abstract
DeepMind's recent spectacular success in using deep convolutional neural nets and machine learning to build superhuman level agents --- e.g. for Atari games via deep Q-learning and for the game of Go via Reinforcement Learning --- raises many questions, including to what extent these methods will succeed in other domains. In this paper we consider DQL for the game of Hex: after supervised initialization, we use selfplay to train NeuroHex, an 11-layer CNN that plays Hex on the 13x13 board. Hex is the classic two-player alternate-turn stone placement game played on a rhombus of hexagonal cells in which the winner is whomever connects their two opposing sides. Despite the large action and state space, our system trains a Q-network capable of strong play with no search. After two weeks of Q-learning, NeuroHex achieves win-rates of 20.4% as first player and 2.1% as second player against a 1-second/move version of MoHex, the current ICGA Olympiad Hex champion. Our data suggests further improvement might be possible with more training time.
Introduction
Following the high-profile successes of DeepMind’s DQN in Atari and AlphaGo in Go, researchers have been eager to see how these methods generalize to other complex domains. This study focuses on Hex, a classic connection game played on an $n \times n$ rhombus of hexagonal cells. Hex presents unique challenges for reinforcement learning, including a large action space (169 possible initial moves on a 13x13 board), sparse rewards (only at the end of the game), and the requirement of understanding global connectivity rather than just local patterns.
Methods
The authors introduce NeuroHex, an 11-layer Convolutional Neural Network (CNN) consisting of 10 convolutional layers followed by a single fully connected output layer.
Key Technical Innovations
- Hexagonal Filters: Standard square convolution filters do not map naturally to a hexagonal grid. The authors created hexagonal filters by zeroing out specific elements of square filters to better capture the "locality" of the Hex board.
- Supervised Mentoring: To solve the sparse reward problem, the network was first trained to replicate the outputs of a heuristic based on electrical resistance. This provided a "rough draft" of game strategy before reinforcement learning began.
- Deep Q-Learning (DQL) with Experience Replay: The agent trained via self-play, storing 100,000 recent experiences in a buffer and sampling mini-batches to perform updates. This improved data efficiency and reduced the correlation between sequential training steps.
- State Representation: The input is a 17x17 grid (the 13x13 board plus 2 layers of padding to handle edge effects). It uses 6 channels to track stone placement and connectivity to specific edges.
Key Results
The agent was trained for approximately two weeks on a single NVIDIA GTX 970.
- Against 1s/move MoHex: NeuroHex achieved a 20.4% win rate as the first player (Black) and a 2.1% win rate as the second player (White).
- Opening Variety: In "all-openings" tests (covering all 169 possible first moves), the win rate sat at 11% against 1s/move MoHex.
- Scaling: As MoHex was given more time to search (up to 9s/move), NeuroHex’s win rate dropped but remained non-zero (approx. 7% for all openings).
Discussion and Conclusion
NeuroHex demonstrates that a deep Q-network can learn strong play in Hex without any look-ahead search. Its ability to win against a world-class engine like MoHex is a testament to the network's representational power. However, a significant "search gap" remains. While NeuroHex is strong for a policy-only player, it cannot yet compete with the full search capabilities of MoHex. Future work could involve integrating NeuroHex into a search-based framework (like MCTS) or adding higher-level tactical features such as "virtual connections" to the input representation.
Summary updated