KataGo v1.4

For discussing go computing, software announcements, etc.
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

KataGo v1.4

Post by lightvector »

KataGo v1.4.0 is released! And new stronger nets!
https://github.com/lightvector/KataGo/releases/

Possibly of interest to some users here is the ability to set a parameter "analysisWideRootNoise" to broaden the search. It does NOT make an attempt to search various moves with an equal number of playouts to each other, but it will cause KataGo to put many more playouts into a greater variety of possible moves, and for very large values, will result in pretty much every move on the board being searched to varying degrees.

I might change the behavior of this parameter in the future, or add a different one, this is sort of experimental to see if it's useful.

Baseline
setTo0.png
setTo0.png (570.1 KiB) Viewed 19877 times
0.05
setTo0.05.png
setTo0.05.png (689.99 KiB) Viewed 19877 times
1
setTo1.png
setTo1.png (898.04 KiB) Viewed 19877 times

Edit: And v1.4.1 is released now, with a quick bugfix for a bug found in v1.4.0. Posted to the same releases page linked above.
Edit: And v1.4.2 is released, with some more bugfixes, including a pretty big one that on certain configurations would greatly harm KataGo's MCTS and could make it do crazy things.
Last edited by lightvector on Tue May 12, 2020 5:42 pm, edited 2 times in total.
User avatar
ez4u
Oza
Posts: 2414
Joined: Wed Feb 23, 2011 10:15 pm
Rank: Jp 6 dan
GD Posts: 0
KGS: ez4u
Location: Tokyo, Japan
Has thanked: 2351 times
Been thanked: 1332 times

Re: KataGo v1.4

Post by ez4u »

How do you see the improvement in the various nets in this latest update?
Dave Sigaty
"Short-lived are both the praiser and the praised, and rememberer and the remembered..."
- Marcus Aurelius; Meditations, VIII 21
dfan
Gosei
Posts: 1598
Joined: Wed Apr 21, 2010 8:49 am
Rank: AGA 2k Fox 3d
GD Posts: 61
KGS: dfan
Has thanked: 891 times
Been thanked: 534 times
Contact:

Re: KataGo v1.4

Post by dfan »

From the release notes on the page linked to:
These are all the new strongest neural net of each size so far. Interestingly, the 40 block net seems to have pulled well ahead in how much it improved this time (about 70 Elo), while the 30 block did not make nearly the same improvement (about 25 Elo). Perhaps the 40 block net got lucky in its gradient descent and the neural net stumbled into learning something useful that the other net didn't. The 20 block net gained maybe around 15 Elo. All of these differences have an uncertainty window of +/- 15 Elo or so (95% confidence), and of course these differences are based on a large varied pool of internal KataGo nets, so might vary a bit against very different opponents.

The strongest net to use for weak to midrange hardware is likely going to be the 20 block net. With the large gain of the 40 block net though, the 40 block net might be stronger for strong hardware and/or long time controls.
gcao
Dies in gote
Posts: 25
Joined: Sat Feb 22, 2020 11:03 am
Rank: AGA 6D
GD Posts: 0
Been thanked: 2 times

Re: KataGo v1.4

Post by gcao »

Congratulations to the new release. There is a lot of interesting enhancements in it. For me the most welcome feature is the synchronous training loop. When I find some time, I'll play with it to see whether I can train a net from my underpowered computer that is playable on an amateur level(even high K level will be ok).
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

Re: KataGo v1.4

Post by lightvector »

v1.4.1 is released now as a quick followup, with a bugfix to an issue that would cause KataGo to fail to perform tree reuse (and therefore lose out on some performance and/or search depth) under certain configurations.

@gcao - Thanks, let me know if you have any issues. The synchronous loop script works for me on a Linux environment once everything is compiled and also I'm in an appropriate python environment with Tensorflow working (I used conda to get TF1.5), but not many other have tested it yet. And you'll still almost certainly want to open up the script and configs to edit the numbers to what works for what you're trying.
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

Re: KataGo v1.4

Post by lightvector »

And v1.4.2 is released, with some more bugfixes, including a pretty big bug that on certain configurations would greatly harm KataGo's MCTS and could make it do crazy things. :oops:

Writing bug free code is hard. :) But I guess occasional bugs comes along with actively working on it this much. I'll keep fixing them as they happen. Thanks to those who posted on Github and LZ discord chat for helping find/report the issues!
User avatar
ez4u
Oza
Posts: 2414
Joined: Wed Feb 23, 2011 10:15 pm
Rank: Jp 6 dan
GD Posts: 0
KGS: ez4u
Location: Tokyo, Japan
Has thanked: 2351 times
Been thanked: 1332 times

Re: KataGo v1.4

Post by ez4u »

lightvector wrote:And v1.4.2 is released, with some more bugfixes, including a pretty big bug that on certain configurations would greatly harm KataGo's MCTS and could make it do crazy things. :oops:

Writing bug free code is hard. :) But I guess occasional bugs comes along with actively working on it this much. I'll keep fixing them as they happen. Thanks to those who posted on Github and LZ discord chat for helping find/report the issues!
From the description there seems to be no new functionality. Does that mean I can just drop the 1.4.2 executable into my 1.4.1 folder without redoing the benchmarking, tweaking of configs, etc.?
Dave Sigaty
"Short-lived are both the praiser and the praised, and rememberer and the remembered..."
- Marcus Aurelius; Meditations, VIII 21
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

Re: KataGo v1.4

Post by lightvector »

Yep, except if you were running with pondering enabled, in which case you might want to briefly check whether the change for how it interprets pondering settings makes you want to adjust anything.
User avatar
Dragon
Dies in gote
Posts: 45
Joined: Thu May 14, 2020 3:07 pm
GD Posts: 0
Has thanked: 47 times
Been thanked: 10 times

Re: KataGo v1.4

Post by Dragon »

Imagine that 19x19 is solved. What do you think, KataGo (the best network, by default) makes the best move 1 time out of 5? out of 10? maybe a difficult question, but your opinion is interesting :)
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

Re: KataGo v1.4

Post by lightvector »

Such low guesses? Those seem waaay too low. :)

If "best" is defined to mean "score-maximizing under game-theoretic perfect play", I'd guess it plays a best move more than 50% of the time. Definitely more than 30%. And I'd guess human pros playing well would do more than 50% too.

Why do I say "a" best move? Because it should be extremely common for there to be many. We know that in lots of of openings, you can easily have 5-10 moves that are all within a point of each other, as far as we can tell. And even if at optimal play some moves turn out unexpectedly bad compared to current judgment, overall it should continue to be common for the top N moves, whatever they happen to actually be, to all be within a point or two of each other. There are just so many possible moves, and points are chunky. Which means that it would take an absurd miracle for it to always be the case that the top score was achievable by only exactly one move, and never 2, or 3, or more of them.

And in the midgame, you have lots of obvious "only" moves - e.g. moves where the opponent threatens something bigger than anything else on the board, and the only sane moves are to respond, or waste a huge ko threat (which could also be optimal if there's not going to be a major ko that game, or if one side has an excess of threats!). Even if in a few of them there's some miraculous tesuji or interposing move that has to be played, realistically optimal play isn't going to be overturning the majority of "only" moves, which any good players currently play correctly.

And in the endgame, you have lots of interchangeable moves that are all mutually optimal because any permutation of them gives the same final score. So lots of moves by current humans and bots in all the current games people play are going to be game-theoretically perfect.
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: KataGo v1.4

Post by Bill Spight »

Dragon wrote:Imagine that 19x19 is solved. What do you think, KataGo (the best network, by default) makes the best move 1 time out of 5? out of 10? maybe a difficult question, but your opinion is interesting :)
Well, if 19x19 go is solved, how was it solved? Surely by the best network. In that case, the best network will always make the best move, always. At least, the best move in the sense of a move that guarantees the win, if a win is possible.

But what do we mean by the best move? Do we mean a move that optimizes the score, win or lose? That's not how today's top bots are trained. In the future, who knows?

There is an even stricter criterion for the best moves, technical correctness. Here is an example.
Click Here To Show Diagram Code
[go]$$Bc Technically incorrect
$$ -----------------------
$$ | . . . . . O O X . . . |
$$ | . . . . O O X . X . . |
$$ | . . O O O X X X X . . |
$$ | . . O . O 2 3 , X . . |
$$ | . . O X O X X , X . . |
$$ | . . O X X X O X . X . |
$$ | . . O . . O O X . . . |
$$ | . . O O O O X X X X X |
$$ | . . O . 1 X X . X O X |
$$ | . . O O O O X X O . O |
$$ | . . . . . O O X X O . |
$$ -----------------------[/go]
To see a reasonably strong amateur, say a 3 kyu, play like this, you'd just have to shake your head. :b1: gains only ½ pt., when a play at 2 would gain 1 pt.
Click Here To Show Diagram Code
[go]$$Bc Technically correct
$$ -----------------------
$$ | . . . . . O O X . . . |
$$ | . . . . O O X . X . . |
$$ | . . O O O X X X X . . |
$$ | . . O . O 1 , , X . . |
$$ | . . O X O X X , X . . |
$$ | . . O X X X O X . X . |
$$ | . . O . . O O X . . . |
$$ | . . O O O O X X X X X |
$$ | . . O , 2 X X . X O X |
$$ | . . O O O O X X O . O |
$$ | . . . . . O O X X O . |
$$ -----------------------[/go]
:b1: gains 1 pt., and then :w2: gains ½ pt. The net result is the same. :b1: is not only bigger, if the ko situation were different, it would take away a potential ko threat for White. There is no case where a Black play at 2 is better than :b1:, so there is no reason to consider it.

What if a bot played like this? All you can do is shrug. Bots are trained to win games, and even if a bot is trained to optimize the score, that does not mean that it is trained for technical correctness. If a technically incorrect play optimizes the score, so what? ;)

----
Edit: I do not mean that playing the largest play is technichally correct. Sometimes it is, sometimes it isn't. For these two plays it is.

Edit2: However, playing a smaller play cannot be technically correct. It is possible to find a whole board position where it is not as good as the larger play.
Last edited by Bill Spight on Tue May 19, 2020 10:12 am, edited 2 times in total.
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
moha
Lives in gote
Posts: 311
Joined: Wed May 31, 2017 6:49 am
Rank: 2d
GD Posts: 0
Been thanked: 45 times

Re: KataGo v1.4

Post by moha »

Dragon wrote:Imagine that 19x19 is solved. What do you think, KataGo (the best network, by default) makes the best move 1 time out of 5? out of 10?
Recently I was surprised to see that even as weak as low dan play have around 30% of moves below 0.5 pts error according to Katago (with 15-20% even in the middle game). But this makes some sense: if the total error is around 200-250 pts, and 5-10+ pts errors happen as well, there also have to be quite a few perfect moves for such sum. If Katago's total is around 50 pts and it also makes some >1 pt errors, it also has to play flawless at least 2/3 of times.

Playing perfect moves is not that hard - it's NOT playing poor moves what is.
Last edited by moha on Tue May 19, 2020 9:32 am, edited 1 time in total.
User avatar
Dragon
Dies in gote
Posts: 45
Joined: Thu May 14, 2020 3:07 pm
GD Posts: 0
Has thanked: 47 times
Been thanked: 10 times

Re: KataGo v1.4

Post by Dragon »

theoretically, it is possible to build a sequence of moves leading to a win, using complete enumeration. probably, there can be many such sequences. To win, you can choose any of them. I meant it. that is, a move that definitely won’t lead to a loss. Modern bots often play beyond comprehension. but, nevertheless, most likely in the near future there will be new programs and networks that surpass them very much. I wonder where roughly the KataGo is located on the line, where the beginning is the novice player, the end is "absolute mind."
Uberdude
Judan
Posts: 6727
Joined: Thu Nov 24, 2011 11:35 am
Rank: UK 4 dan
GD Posts: 0
KGS: Uberdude 4d
OGS: Uberdude 7d
Location: Cambridge, UK
Has thanked: 436 times
Been thanked: 3718 times

Re: KataGo v1.4

Post by Uberdude »

All my moves are perfect, just some are in the wrong order :D
User avatar
Dragon
Dies in gote
Posts: 45
Joined: Thu May 14, 2020 3:07 pm
GD Posts: 0
Has thanked: 47 times
Been thanked: 10 times

Re: KataGo v1.4

Post by Dragon »

lightvector, I express to you my great admiration and true gratitude for the KataGo !!! this is amazing!!!
Post Reply