Difference between revisions of "KataHex"

From HexWiki
Jump to: navigation, search
(Pre-trained networks: Clarification)
(the new net does better in arbitrary positions)
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
 
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. [https://zhuanlan-zhihu-com.translate.goog/p/476464087?_x_tr_sl=auto&_x_tr_tl=en According to HZY], the up-trained 19x19 network is relatively reliable, but the 27x27-network is not.
 
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. [https://zhuanlan-zhihu-com.translate.goog/p/476464087?_x_tr_sl=auto&_x_tr_tl=en According to HZY], the up-trained 19x19 network is relatively reliable, but the 27x27-network is not.
  
Each pre-trained neural network is able to play Hex at the size it was trained on, or any smaller size. Thus, the 19x19 network model can also be used to play 11x11 or 13x13.
+
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.
 
"KataHex" refers generally to the KataHex program, but often more specifically to the pre-trained 19x19 neural network made by HZY.
Line 17: Line 19:
 
== Limitations ==
 
== Limitations ==
  
Since KataHex was only trained on self-play, it does not always do well when asked to play from an arbitrary starting position. It seems to be particularly thrown off if the starting position does not have the same number of black and white stones.  
+
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 ==
 
== Links ==
Line 25: Line 27:
 
* David Wu's original KataGo: <https://github.com/lightvector/KataGo>
 
* David Wu's original KataGo: <https://github.com/lightvector/KataGo>
 
* HZY's KataHex: <https://github.com/hzyhhzy/KataGo/tree/Hex2022>
 
* HZY's KataHex: <https://github.com/hzyhhzy/KataGo/tree/Hex2022>
* Selinger's moficiations: <https://github.com/selinger/katahex>
+
* Selinger's modifications: <https://github.com/selinger/katahex>
  
 
'''Pre-trained network models:'''
 
'''Pre-trained network models:'''
  
* HZY's pre-trained 19x19 network: [https://drive.google.com/file/d/1xMvP_75xgo0271nQbmlAJ40rvpKiFTgP/view katahex_model_20220618.bin.gz]
+
* 20240812 (current strongest net): <https://github.com/hzyhhzy/KataGo/releases/tag/Hex_20240812>
 +
* 20220618: [https://drive.google.com/file/d/1xMvP_75xgo0271nQbmlAJ40rvpKiFTgP/view katahex_model_20220618.bin.gz]
  
 
'''GUIs:'''
 
'''GUIs:'''
  
* HZY's KataHex works with this modified LizzieYzy GUI: [https://drive.google.com/file/d/1qbTTmPFiUkM_346DeKS1E9gJR-roNH63/view KataHex_LizzieYZY_20220313.zip].
+
* The 20240812 net is bundled with a modified LizzieYzy GUI: <https://github.com/hzyhhzy/KataGo/releases/tag/Hex_20240812>
 +
* An older net with the modified LizzieYzy GUI: [https://drive.google.com/file/d/1qbTTmPFiUkM_346DeKS1E9gJR-roNH63/view KataHex_LizzieYZY_20220313.zip].
 
* Selinger's KataHex works with HexGUI: <https://github.com/selinger/hexgui>
 
* Selinger's KataHex works with HexGUI: <https://github.com/selinger/hexgui>
  

Latest revision as of 21:34, 17 August 2024

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:

Analysis: