It is currently Mon May 06, 2024 1:46 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
Offline
 Post subject: Endgame with thousand year ko - KataGo-aided analysis
Post #1 Posted: Thu Apr 30, 2020 6:57 am 
Lives in sente

Posts: 757
Liked others: 114
Was liked: 916
Rank: maybe 2d
This is my attempted analysis of a fascinating and complex endgame that came up in the Leela Zero discord chat when analyzing a game where SAI appeared to make some strange moves before resigning. Apparently hiding beneath was some incredible complexity. Thanks to Dorus and Vandertic from LZ discord bringing to attention such an interesting endgame to analyze.

In this game, there is a thousand year ko in the corner that is destined to become a ko and never a seki, and therefore which dramatically alters the way the endgame should play out into something really quite bizarre. Although neither player realized it, the entire endgame revolved around ko threat creation, magnification, and destruction, with some very unusual tactics that one doesn't normally see.

The long example variations branching from move 252 and 257 in particular are a kind of fight that I knew about theoretically, but hadn't really grokked before. The players aren't fighting over points, they're fighting over ko threats. You have them playing moves that sometimes aren't even threats (normally one would just tenuki the move as dead-in-gote), but the move creates a followup move that threatens something, and that's the point - to make more and bigger ko threats, or to threaten to have threats. So sometimes dead-in-gote moves are actually strong moves - it's one-step more meta than normal fighting.

One pleasant surprise I found is that KataGo's neural net seems to understand that this is the theme of the game. Although its understanding is far from perfect and it is far from able to solve many variations, both the policy and value heads were giving outputs that indicated general understanding of the goals. The policy often suggested some of these moves that would normally be dead-in-gote, or unnecessary defense in gote but that are good in this position. I suppose there are enough multi-step and thousand year kos in self-play to give data on how such fights work.

Enjoy!

(Edit: Updated parts of the text in the SGF slightly)



Attachments:
23499524-263-12bTurboSai-天可汗-analysis.sgf [23.07 KiB]
Downloaded 553 times

This post by lightvector was liked by 4 people: Bill Spight, dfan, johnsmith, xela
Top
 Profile  
 
Offline
 Post subject: Re: Endgame with thousand year ko - KataGo-aided analysis
Post #2 Posted: Thu Apr 30, 2020 8:54 am 
Honinbo

Posts: 10905
Liked others: 3651
Was liked: 3374
lightvector wrote:
This is my attempted analysis of a fascinating and complex endgame that came up in the Leela Zero discord chat when analyzing a game where SAI appeared to make some strange moves before resigning. Apparently hiding beneath was some incredible complexity. Thanks to Dorus and Vandertic from LZ discord bringing to attention such an interesting endgame to analyze.

In this game, there is a thousand year ko in the corner that is destined to become a ko and never a seki, and therefore which dramatically alters the way the endgame should play out into something really quite bizarre. Although neither player realized it, the entire endgame revolved around ko threat creation, magnification, and destruction, with some very unusual tactics that one doesn't normally see.


Yes, the evaluation of hyperactive ko positions, such as this one, depends greatly upon who is komaster, so that, in effect, the preparation for the ko fight can be where the struggle occurs. To a lesser degree you can see such maneuvers even for a regular ko. I have noticed that the bots are much more attuned to this preparation than humans seem to be.

Quote:
The long example variations branching from move 252 and 257 in particular are a kind of fight that I knew about theoretically, but hadn't really grokked before. The players aren't fighting over points, they're fighting over ko threats. You have them playing moves that sometimes aren't even threats (normally one would just tenuki the move as dead-in-gote), but the move creates a followup move that threatens something, and that's the point - to make more and bigger ko threats, or to threaten to have threats. So sometimes dead-in-gote moves are actually strong moves - it's one-step more meta than normal fighting.

One pleasant surprise I found is that KataGo's neural net seems to understand that this is the theme of the game. Although its understanding is far from perfect and it is far from able to solve many variations, both the policy and value heads were giving outputs that indicated general understanding of the goals. The policy often suggested some of these moves that would normally be dead-in-gote, or unnecessary defense in gote but that are good in this position. I suppose there are enough multi-step and thousand year kos in self-play to give data on how such fights work.


When I looked at some AlphaGo self play game records a couple of years ago, I noticed that very frequently there were significant kos left on the board near the end. I guessed that one reason might be that kos can give the player who is behind more of a chance to swing the game than other plays, and maybe in a close game each side wanted to preserve that possibility as the lead swung back and forth. Exquisite skill at ko fighting and preparation may be something that all the top bots develop through self play.

Thank you very much for showing us this game. :D

_________________
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.

Top
 Profile  
 
Offline
 Post subject: Re: Endgame with thousand year ko - KataGo-aided analysis
Post #3 Posted: Thu Apr 30, 2020 10:18 am 
Honinbo

Posts: 10905
Liked others: 3651
Was liked: 3374
lightvector wrote:
Right now, white should be winning. The thing white has to be careful of is the thousand year ko shape in the upper right. If it ends as seki, and all other areas of the board resolve "as normal", then white will win easily.

But if black kills the upper right, AND does not lose any moves in the endgame on the rest of the board, including filling the dame, then black will win (by 1.5). If black loses even one extra dame to white (a swing of 2 points), white will win even if black kills the upper right white group.


An important point. IIUC, based on what you say, currently White is ahead by 7 pts. on the rest of the board, which, with komi will give White 14½ pts. If Black kills the top right corner that will give Black 16 pts., for a win by 1½. Is that right?

Quote:
Black must prepare at least one *big* threat more than white before starting the ko in the upper right in order to win it. A small threat is not enough - white will happily ignore any small threat to live with points on the upper right, and win the game.

Since ko is black's only way to win, the upper right becoming ko is completely inevitable in this game. White has no way to stop it, and black WILL start it at some point.


Will Black start the ko? See below. :)

Quote:
Also, mostly it doesn't help white much to "fight" the small ko in the upper right early on, because white has no followup to win it. Black can take it back any time later. The only thing that fighting it does is to delay and mess with the exact moment that black can start it, and to buy white a little bit of time to remove bigger threats, so white must wait until the end to try to fight it.


Suppose that Black is the komaster of the 10,000 year ko. The ambient temperature looks like it is 2 pts. by area scoring. If so, Black's equity in the corner is 14 pts, (16 - 2). That depends upon Black only being komaster, and not komonster, with the ability to delay winning the ko. But, as you indicate, Black actually does not have a large enough ko threat to be komaster. In the ko fight White can ignore Black's threat. Since 14 pts. is not enough to win, as you point out above, White may be able to win the game by starting the ko, even if White does not play a ko threat. :shock: The extra move that gains 2 pts. should be enough.

OC, that's a little too close for comfort, but it does suggest that a winning play for White is to start the ko fight NOW. From what you say, Black may have to ignore White's threat, which will gain more than 2 pts., so the win should be secure. :)

What happens if KataGo plays White 234 as atari in the top right corner?

Edit: The same strategy is available earlier in the game, which makes it harder for Black to be komonster. White 192 is an obvious possibility. Earlier, the math is slightly different because it is more costly for White to lose the ko.

Edit2: Starting the ko with White 232 is even better, eh?

_________________
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.

Top
 Profile  
 
Offline
 Post subject: Re: Endgame with thousand year ko - KataGo-aided analysis
Post #4 Posted: Thu Apr 30, 2020 2:59 pm 
Lives in sente

Posts: 757
Liked others: 114
Was liked: 916
Rank: maybe 2d
Bill Spight wrote:
OC, that's a little too close for comfort, but it does suggest that a winning play for White is to start the ko fight NOW. From what you say, Black may have to ignore White's threat, which will gain more than 2 pts., so the win should be secure. :)

What happens if KataGo plays White 234 as atari in the top right corner?

Edit: The same strategy is available earlier in the game, which makes it harder for Black to be komonster. White 192 is an obvious possibility. Earlier, the math is slightly different because it is more costly for White to lose the ko.

Edit2: Starting the ko with White 232 is even better, eh?


Thanks, you're right, and this is definitely a way white can try that I hadn't personally considered enough. As far as I can tell, KataGo agrees these do win, perhaps by 0.5. (I'm not analyzing before 232 though). So if white has counted very accurately and is sure of the 0.5 margin, then they also seem pretty safe. KataGo seems not to like such a way for white as much in either winrate or score though. Score obviously because removing threats wins by a lot more, and winrate presumably because the value head doesn't quite think in terms of this kind of reasoning where one can almost logically prove an 0.5 win as long as white gets any 2 moves in a row for the ko and is happier to have a solid 3 or 6 point margin.

About the last point where white can try this strategy is somewhere around move 242 or 244 - after that it's too late and white can only prepare for black to start the ko.

Top
 Profile  
 
Offline
 Post subject: Re: Endgame with thousand year ko - KataGo-aided analysis
Post #5 Posted: Thu Apr 30, 2020 5:58 pm 
Honinbo

Posts: 10905
Liked others: 3651
Was liked: 3374
lightvector wrote:
Bill Spight wrote:
OC, that's a little too close for comfort, but it does suggest that a winning play for White is to start the ko fight NOW. From what you say, Black may have to ignore White's threat, which will gain more than 2 pts., so the win should be secure. :)

What happens if KataGo plays White 234 as atari in the top right corner?

Edit: The same strategy is available earlier in the game, which makes it harder for Black to be komonster. White 192 is an obvious possibility. Earlier, the math is slightly different because it is more costly for White to lose the ko.

Edit2: Starting the ko with White 232 is even better, eh?


Thanks, you're right, and this is definitely a way white can try that I hadn't personally considered enough. As far as I can tell, KataGo agrees these do win, perhaps by 0.5. (I'm not analyzing before 232 though). So if white has counted very accurately and is sure of the 0.5 margin, then they also seem pretty safe. KataGo seems not to like such a way for white as much in either winrate or score though. Score obviously because removing threats wins by a lot more, and winrate presumably because the value head doesn't quite think in terms of this kind of reasoning where one can almost logically prove an 0.5 win as long as white gets any 2 moves in a row for the ko and is happier to have a solid 3 or 6 point margin.


Yeah, me, too. ;)

Quote:
About the last point where white can try this strategy is somewhere around move 242 or 244 - after that it's too late and white can only prepare for black to start the ko.


Even though nominally the temperature is the same, the change in the ko threat situation since 233 is a big red flag. That, OC, is reflected in the change in KataGo's winrate estimates.

The strategy of making a ko in order to lose it is not well known. Also, it goes against the grain for humans, as we are inclined to try to manufacture or destroy ko threats instead. I have never seen it used in the wild, but there may well be cases I am unaware of.

BTW, Black 249, taking the ko, is probably a mistake. As a rule Black should only take the ko to try to fill it, or to make the large ko while it still has a good threat. And you are right that White should not take it back but should aim at keeping Black from becoming komaster.

Again, many thanks for showing us this game record and your analysis. :D

_________________
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.

Top
 Profile  
 
Offline
 Post subject: Re: Endgame with thousand year ko - KataGo-aided analysis
Post #6 Posted: Thu Apr 30, 2020 11:18 pm 
Judan

Posts: 6184
Liked others: 0
Was liked: 793
lightvector, thanks for stating ko strategy in the analysis! Although the strategies about creating or eliminating (delayed) Negative Ko Threats are standard for every player strong in ko fights (therefore, Bill, I disagree about programs knowing it better than humans), stating the strategies helps to avoid forgetting them.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group