HEX and Neurodynamic Programming

Debangshu BanerjeearXiv 2020

Abstract

This paper explores the application of Neurodynamic Programming and Deep Reinforcement Learning to the game of Hex, a complex connection game characterized by a high branching factor and no possibility of draws. By implementing self-play mechanisms and optimizing for the Projected Bellman Error (PBE), the researchers demonstrate that neural networks can develop sophisticated spatial strategies without relying on traditional game-tree search or hand-coded heuristics. The study compares Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN) architectures, finding that CNNs combined with PBE optimization yield the most robust performance.

The Challenge of Hex

Hex is a mathematically elegant board game played on a rhombus-shaped grid of hexagons. Players attempt to form an unbroken chain of pieces between their designated opposite sides. Unlike chess, Hex has a massive branching factor—averaging 100 legal moves per turn on a standard 11x11 board—and is known for its deep strategic complexity. Traditionally, top-tier Hex engines relied on "game-tree search" and complex, hand-crafted heuristics like "Virtual Connections" to evaluate board positions. This research seeks to move away from these "crutches" by using Deep Reinforcement Learning (RL), inspired by the success of AlphaGo Zero, to see if a machine can learn the game's spatial complexities purely through self-play.

Neurodynamic Programming Methods

The authors treat Hex as a reinforcement learning problem, using neural networks to approximate the value of board states. The core of their approach is "Neurodynamic Programming," which involves training an agent to estimate the value function $v_\theta(s, a)$ through a sequence of interactions with the environment.

The reinforcement learning framework for Hex, illustrating the transition between board states $s_t$ and the estimation of the value function $v_\theta$.

As shown in the reinforcement learning loop above, the agent observes a state $s_t$, selects an action $a_t$, and receives a reward $R_{t+1}$ as it transitions to the next state $s_{t+1}$. The objective is to refine the value function such that it accurately predicts the expected cumulative reward, effectively learning which board configurations are most likely to lead to a win.

Neural Architectures and Objectives

The study compared standard Convolutional Neural Networks (CNNs) with Recurrent Neural Networks (RNNs). The board was represented as a 6-channel 3D array capturing stone positions and connectivity to edges.

Detailed CNN architecture used for board evaluation, featuring multi-channel inputs, stacked filters, and value function distribution output.

A core technical contribution is the focus on minimizing the Projected Bellman Error (PBE) rather than the standard Mean Squared Error (MSE). PBE is a more robust objective for RL when using function approximators like neural networks because it accounts for how the Bellman operator interacts with the function space. The architecture (illustrated above) utilizes multiple layers of filters to process the spatial relationships on the hexagonal grid, eventually outputting a value function distribution for all possible moves.

To train the agent, the researchers used a self-play mechanism that exploits the symmetry of the Hex board. By transposing and mirroring the board, a single network can learn to play both sides effectively while maintaining a consistent evaluation of positions.

Key Insights and Results

  • Spatial vs. Sequential: The authors initially hypothesized that RNNs might excel by "remembering" move sequences. However, CNNs outperformed RNNs, suggesting that Hex is fundamentally about spatial connectivity and global patterns rather than the specific chronological order of moves.
  • The Power of PBE: Results showed that agents optimizing for the Projected Bellman Error consistently outperformed those using standard MSE. This highlights the importance of choosing the right mathematical objective when training deep RL agents for strategic games.
  • Self-Play Sufficiency: Similar to AlphaGo Zero, the authors found that pre-training on human data didn't offer a significant performance boost. The agent discovered optimal strategies entirely on its own.

In tournaments conducted on a 3x3 board, the CNN-PBE agent emerged as the champion, securing 73 total wins. CNN-MSE followed with 58 wins, while RNN-based models lagged behind (RNN-PBE: 56 wins; RNN-MSE: 54 wins).

Limitations and Future Work

While these results are promising, the experiments were conducted on a 3x3 board to allow for rapid iteration. Real-world Hex is played on 11x11 or 13x13 boards, where scaling introduces significant computational challenges and exploration issues. Future work will focus on scaling these Neurodynamic agents to standard-sized boards and conducting formal theoretical investigations into the convergence guarantees of their specific gradient calculations.

Summary updated

BibTeX
@misc{banerjee2020hex,
  author = {Debangshu Banerjee},
  title = {{HEX and Neurodynamic Programming}},
  year = {2020},
  eprint = {2008.06359},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2008.06359},
}
Figure