KataGo v1.4

For discussing go computing, software announcements, etc.
Yakago
Dies in gote
Posts: 53
Joined: Tue Jan 16, 2018 10:39 am
GD Posts: 0
Has thanked: 2 times
Been thanked: 12 times

Re: KataGo v1.4

Post by Yakago »

The 40 block extended network has some interesting side effects :p
Image

Note that it fully expects white to capture.
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 »

There shouldn't be anything special about "40 blocks", it happens for other network sizes, and also happens for pretty much any bots, not just KataGo. It's usually because the bot doesn't understand something *else* on the board that is going worse than it anticipated, so it plays some delaying move, very slightly postponing the inevitable. It's like the bot's version of a human timesuji in that it happens at similar times - when there's a messy hard-to-understand-for-that-player situation imminent. Except it's not to gain useful thinking time, it just that it doesn't know how to stop the situation, so it just wastes some time and some aji.

A second rarer case where it happens is because a bot is overlooking or incorrectly rejecting some move in some imminent fight, but if it plays the ko threat, in that *slightly different* board position it finds the move. This would be bizarre for a human to then not apply that same discovered move back to the original position, but bots don't think in a human-like way. Basically, for a bot, you can think of every move as being searched by a separate copy of the bot, and these copies don't talk to each other except by means of reporting how good or bad their result was. This is because the search algorithm sitting on top of the otherwise very sophisticated neural net is pretty stupid,, and nobody yet understands how to integrate it better than to shuffle these top-level evaluations around. So it's perfectly possible that the "copy" of the bot that read out the upcoming fight after wasting the ko threat found a better move than "copy" of the bot that read out the upcoming fight without wasting the ko threat, just by random chance. Then they compare values, wasting the ko threat got a better score, so that's the move the bot plays. This is uncommon, but it does happen.

The perhaps rarest situation is when the bot actually just evaluates the board as better without the ko threat, due to some sort of overfitting. Maybe similar shapes came up in self-play games before and it didn't waste the ko threat in those games and that side lost more games than would have been fair due to bad luck, whereas in games when it did waste the ko threat (or perhaps had to use the ko threat legitimately in an earlier ko), it randomly won more games than would have been fair due to good luck. If unlucky/lucky enough here, maybe the neural net develops some sort of superstition - "hey every time I leave this shape on the board where I still have the ko threat I lose the game, whereas when I waste the threat and leave *that* shape on the board, I win". So even though the action itself logically couldn't have caused those losses/wins in that way, the net may still be affected by its superstition (not unlike many humans have their own superstitions about things in real life that make no logical sense), until eventually more training and more games fix that superstition.

I've also seen this, but the first two reasons, and the first reason especially, are much more common.

The neural nets for all modern bots generally do assign positive value to having ko threats and to leaving aji, so all three pathologies above are fighting against a general bias towards preserving one's threats and aji. Which is why wasting of threats and aji doesn't happen willy-nilly all the time, it just happens occasionally here and there. E.g. as many as multiple times in a game in some cases, but only a small percentage of the moves overall. Only when one of the above three effects (or possibly rare others) is strong enough to overwhelm the bias to want to preserve them.
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 »

Thanks for that explanation. :)

I noticed something similar with Leela 11. I tried to get some idea of its assessment of the size of plays by setting up an independent section of the board with a simple gote of known size, with no ko threat. Usually I balanced that with another independent section of the board that was completely settled, also with no ko threat, so that I knew that the whole board had a mean value of zero. OC, proper komi would have been affected. ;)

It was a dismal failure. Leela 11 was bumfuzzled. My guess is that in its training it had encountered nothing at all like such a board and was therefore clueless.
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
jann
Lives in gote
Posts: 445
Joined: Tue May 14, 2019 8:00 pm
GD Posts: 0
Been thanked: 37 times

Re: KataGo v1.4

Post by jann »

Though not the case here with wasted threat, but there is another quirk when a bot starts to understand things are going poor direction for it (as search deepens it returns worse and worse scores).

In such cases it can also prefer moves that create the most potential answers. Even slightly worse moves look better if there are more responses to be searched, as this causes the overall search depth to increase slower (thus pushing the bad development a bit farther / pull the horizont nearer).
gennan
Lives in gote
Posts: 497
Joined: Fri Sep 22, 2017 2:08 am
Rank: EGF 3d
GD Posts: 0
Universal go server handle: gennan
Location: Netherlands
Has thanked: 273 times
Been thanked: 147 times

Re: KataGo v1.4

Post by gennan »

@lightvector: Great explanation!

So humans are not alone in having to unlearn bad habits picked up earlier in their careers ;)
Yakago
Dies in gote
Posts: 53
Joined: Tue Jan 16, 2018 10:39 am
GD Posts: 0
Has thanked: 2 times
Been thanked: 12 times

Re: KataGo v1.4

Post by Yakago »

I should add the full position for clarity =)

By 40-block extended, I meant one of the experimental networks. So it is possible that this is some overfitting as we are looking at a flying-dagger variation. (and japanese rules 6.5 komi btw)

Image
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 »

New release, and the final neural nets for this run!

Release:
https://github.com/lightvector/KataGo/r ... tag/v1.4.5

Also, reddit post:
https://www.reddit.com/r/baduk/comments ... completed/
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 »

Yoonyoung playing KataGo -17.5 reverse komi live now. "My plan is: don't die" :)

https://online-go.com/game/25141259

https://www.twitch.tv/kimyoonyoung

First game she lost, KG had caught up around move 110, and then was 30+ ahead with a big trade kill.

2nd game she is white vs KG (PDA = 1.0)
Vargo
Lives in gote
Posts: 337
Joined: Sat Aug 17, 2013 5:28 am
GD Posts: 0
Has thanked: 22 times
Been thanked: 97 times

Re: KataGo v1.4

Post by Vargo »

Three tests with KG 1.4.5, network g170e-b20c256x2-s5303129600-d1228401921, maxVisits = 100, 1000, 10000, and 100000.
gogui-twogtp 1.5.1, komi 7.5, chinese rule, no error, no duplicate game.

1000visits vs 100visits : 1000visits wins 20-0 (all games by resignation)
10000visits vs 1000visits : 10000visits wins 20-0 (19 games by resignation, 1 game by 0.5)
100000visits vs 10000visits : 100000visits wins 5-0 (4 games by resignation, 1 game by 0.5, each game ~4800sec)

Does it continue like this ? (can't wait for a quantum computer to test it ;-) )
Stats for 100000visits vs 10000visits
1.jpg
1.jpg (372.71 KiB) Viewed 13718 times
The games :
100kv_10kv.rar
(4.29 KiB) Downloaded 556 times
(100000 visits is B in games 0,2,4)
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 »

20-0 results don't give much information.

How about aiming for 20-10 results? The results don't have to be exact, OC.

Or, if that is too much trouble, how about seeing the results of doubling MaxVisits? :)
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
Vargo
Lives in gote
Posts: 337
Joined: Sat Aug 17, 2013 5:28 am
GD Posts: 0
Has thanked: 22 times
Been thanked: 97 times

Re: KataGo v1.4

Post by Vargo »

Bill Spight wrote:20-0 results don't give much information.
Aiming for 50% winrate between KG 1.4.5, network g170e-b20c256x2-s5303129600-d1228401921, maxVisits = 300, and 3000.
chinese rule, gogui-twogtp 1.5.1

KG 3000visits (always B) v. KG 300visits (always W) komi 10, 20 ,25 and 28 (not sure if it's the right way to do this...)

komi=10 :
3000visits wins 10-0 (all by resignation, no error, no duplicate)
W needs more komi...

komi=20
3000visits wins 9-1 (all by resignation, no error, no duplicate)
W still needs more komi.

komi=25
3000visits wins 14-6 (counting 0.5 for a draw : 12 times B+R, 1 time B+1, 5 times W+R and 2 draws, no error, no duplicate)
With komi 25, when W+R , KG3000visits resigned (too?) rapidly, maybe I should have changed the resign threshold.
W still needs some more komi.

komi=28
300visits wins 11-9 (counting 0.5 for a draw : 7 times B+R, 9 times W+R and 4 draws, no error, no duplicate)
With 300 visits and 3000 visits, komi=28 seems about fair ???

All this very unscientific, but 10 times more visits seem to make a really big strength difference, at least for hundreds or thousands of visits.
Stats for komi=28
2.jpg
2.jpg (442.63 KiB) Viewed 13636 times
Vargo
Lives in gote
Posts: 337
Joined: Sat Aug 17, 2013 5:28 am
GD Posts: 0
Has thanked: 22 times
Been thanked: 97 times

Re: KataGo v1.4

Post by Vargo »

Same tests with KG 1.4.5, maxVisits = 600, and 6000.
chinese rule, gogui-twogtp 1.5.1

KG 6000visits (always B) v. KG 600 visits (always W) komi 28, 20

komi=28 :
KG 600 visits wins 9-1 (all games by resignation, no error, no duplicate)
komi=28 seems to be too much here

komi=20
KG 6000 visits wins 12-8 (7 times W+R, 11 times B+R, 2 draws, no error, no duplicate)

For KG 600 visits v. KG 6000 visits, a komi between 20 and 28 would seem resonable (???)


Stats for komi=20
3.jpg
3.jpg (443.1 KiB) Viewed 13596 times
Vargo
Lives in gote
Posts: 337
Joined: Sat Aug 17, 2013 5:28 am
GD Posts: 0
Has thanked: 22 times
Been thanked: 97 times

Re: KataGo v1.4

Post by Vargo »

Last test with KG 1.4.5, maxVisits = 150, and 1500.

KG 1500visits (always B) v. KG 150visits (always W) komi 28

chinese rule, gogui-twogtp 1.5.1,
resignThreshold changed to -0.999 for both, hence the high number of moves per game and the high number of W+xx and B+xx.
numSearchThreads probably too high...


KG 1500 visits wins 11.5 - 8.5 (7 times W+xx, 1 time W+R, 10 times B+xx, 1 time B+R, 1 draw, no error, no duplicate)
Here, komi = 28 seems a bit too low (?)

Increasing 10 times the number of visits makes KG much stronger, but maybe it has less and less effect when the initial number of visits gets big.


Stats :
4.jpg
4.jpg (433.12 KiB) Viewed 13543 times
Sneegurd
Lives with ko
Posts: 129
Joined: Fri Mar 23, 2012 8:57 am
GD Posts: 0
Has thanked: 20 times
Been thanked: 17 times

Re: KataGo v1.4

Post by Sneegurd »

It's so rarely mentioned, so I do it here: KaTrain is awesome. Beside Katago, Sabaki and Lizzie it is an essential tool for training. Such a usable UI!

https://github.com/sanderland/katrain/releases
Check their channel to see it: https://www.youtube.com/channel/UCH7uAi ... OHw/videos
goame
Lives with ko
Posts: 132
Joined: Sat Jan 28, 2017 12:25 am
GD Posts: 0
Been thanked: 7 times

Re: KataGo v1.4

Post by goame »

Yakago wrote:I should add the full position for clarity =)

By 40-block extended, I meant one of the experimental networks. So it is possible that this is some overfitting as we are looking at a flying-dagger variation. (and japanese rules 6.5 komi btw)

Image
I have done a lot of analysis with the biggest net 40x384 and my two RTX 2080 Ti.
It looks much stronger and the quality of the analysis increased.
The playing style is also more flexible.
It should now take twice the time before my 64 GB RAM will reach his limit and that's also very good.
It takes longer before I will have a board full of red dots and see nothing (see the picture) and that is very very very good.

Feel free to use:
https://d3dndmfyhecmj0.cloudfront.net/g ... index.html
Large Net Size (never used for self-play)
[740M] g170e-b40c384x2-s2348692992-d1229892979.zip

It would be interesting to have and test also some 40x512, 50x384 and 50x512 nets :clap:.
Post Reply