KataHex

From HexWiki
Jump to: navigation, search

KataHex is a free and open-source computer Hex program, capable of defeating top-level human players. It implements Monte Carlo tree search with a convolutional neural network providing position evaluation and policy guidance.

History and versions

KataHex is based on KataGo, a computer Go program developed by David Wu that was first released on 27 February 2019. It was adapted for Hex by "HZY" between February 2020 and May 2022. While initially unnamed, the Hex-adaptation of KataGo quickly became known as "KataHex" among Hex players.

The HZY implementation of KataHex speaks a non-standard dialect of GTP and can only interact with a specially modified version of the Go GUI known as LizzieYzy. A further adaptation of KataHex that is capable of interfacing with Hexgui was made by Selinger.

Pre-trained networks

HZY initially trained the neural network model on two NVIDIA GeForce RTX 2080 Ti GPUs for about 20 days on 13x13. They then up-trained the network on 19x19 for one day, and on 27x27 for an additional day. According to HZY, the up-trained 19x19 network is relatively reliable, but the 27x27-network is not.

The newest model, 20240812, is trained on two RTX 4090 GPUs for 2 months on 15x15, 15 days on 19x19, and 3 days on 27x27.

Running KataHex requires both a neural net model (the "weights"), and an engine to load the weights. Each neural net is able to play Hex not only at the size it was trained on, but also smaller and larger sizes, as long as the engine is compiled to support the size. (However, the net will not play particularly well on sizes larger than it was trained on.)

"KataHex" refers generally to the KataHex program, but often more specifically to the pre-trained 19x19 neural network made by HZY.

Limitations

Since KataHex was only trained on self-play, it does not always do well when asked to play from an arbitrary starting position. Older nets are particularly thrown off if the starting position does not have the same number of black and white stones, but the issue seems to have been mitigated with the 20240812 net.

Links

Program:

Pre-trained network models:

GUIs:

See also