Skip to main content
3 of 3
added 211 characters in body
hzy
  • 631
  • 1
  • 10

https://dev.to/hzyhhzy/analysis-of-the-length-of-optimal-games-of-hex-game-using-alphazero-like-ai-16n7

I wrote a post on this question.
$f(n)\approx0.425*n^2+0.515*n$ according to KataHex


Updated on 2024.8.20
Recently I'm training KataHex with move limit.
We can estimate the length of optimal Hex by the win-rate and draw-rate with different move limit settings for KataHex.
Some known results until now (larger boards will be updated soon):
1x1 board: 1 moves
2x2 board: 3 moves
3x3 board: 5 moves
4x4 board: 9 moves
5x5 board: 13 moves
6x6 board: 19 moves
7x7 board: 25 moves
8x8 board: 31 moves
9x9 board: 37 moves
larger than 9x9 are not sure, the bounds are estimated by the win-rate and draw-rate of KataHex
11x11 board: 55~59 moves
13x13 board: 75~81 moves
15x15 board: 99~103 moves

$f(n)\approx0.6*n^{1.9}$
or $f(n)\approx 0.75*\frac{n^2}{ln(n)^{0.5}}$


I guess it is $O(n^{2})$, maybe about $n^{2}/2$ . I just guessed based on some games by KataHex. These games almost filled the full board, no area is useless. I can't give out any "mathematical" explanation for such a difficult game.
KataHex is an alphazero-like Hex AI modified by me from KataGo. I trained it on 2*RTX4090 for 3 months. It plays well on boards smaller than 37x37. (at least stronger than any human) 27x27 KataHex selfplay 37x37 KataHex selfplay

Some thinking:
We know that ~80% first moves for the first player are winning, which means at least 80% locations are not useless in the optimal solution.
If there exists a way to win in less than $O(n^{2})$ moves, obviously the most part of the board is not used. We can imagine that if the unused part is filled by white stones, obviously black can't win.
More strategicly, strong hex players will always trying to form multiple winning paths at the same time, making the opponent unable to block them.
The problem of this explaination is that this can't show that the most part are used in one single game. If the most part can be cut and become useless after less than $O(n^{2})$ moves, these inferences become not valid

hzy
  • 631
  • 1
  • 10