# Some AI-guided and poorly organized analysis of 1-move pies

There are several reasonable ways of implementing a Pie rule in go. Probably the simplest and most popular options are:

A. The first player sets komi. The second player decides which color to play.
B. The first player makes the first move (i. e. places one black stone). The second player decides which color to play.

Some people think komi is inelegant, which makes option B attractive since it allows to make the game somewhat fair without having to use komi.

But of course there’s no guarantee that there is one first black move which gives a fair game with 0 komi. In fact, on the 19x19 board it seems that (according to KataGo) everything above the first line is at least slightly good for black, while everything on the first line is at least slightly good for white.

(This entire post assumes Japanese-like rules, since it’s unlikely that any 0-komi game on an odd-sized board will actually end in a draw under Chinese rules, and I like to use “draw under perfect play” as a proxy for “fair”, although they are obviously not always the same thing)

In particular, if black opens on 2-2 (probably the worst second line move?), KataGo estimates that black is ahead by between 1 and 2 points. This wasn’t that surprising to me, 2-2 is bad but not super bad, so it makes sense that it doesn’t completely erase black’s first-move advantage.

But I was surprised to see that if black opens on 1-10 (probably the best first line move?), then the white advantage is similarly small!

Comparing this with the evaluation of the empty board means that the value of K19 is roughly 5 points!

I’m using a recent KataGo network but my computer is very slow, so maybe someone else would like to check this setup with more playouts. It would also be interesting to see a KataGo game from this opening, to maybe better understand how K19 can be used.

So there might not be a balanced 1-stone pie on 19x19, but maybe we can find one on some smaller board? I started analyzing 7x7, and sort of expected KataGo to be able to play “almost perfectly” with something like 100k playouts. But since some sequences can end in close capturing races involving ko’s, it’s really hard (even for KataGo it seems) to predict the result without lots and lots of reading.

So take this with a huge grain of salt, but:
As far as I can tell, both 2-3 and 2-4 are reasonable candidates for fair pies on 7x7. Here is a demo board showing a possible drawing line for each one of them. The games are mostly calm and simple (the aforementioned complications are hiding in other variations), but this tesuji is pretty cool:

D3 seems to be the only move which maintains the draw.

It would be interesting to see someone with a faster computer do a deeper analysis of these starting moves (2-3 and 2-4 on 7x7, with Japanese rules 0 komi), and find something that my KataGo is missing

5 Likes

Some people might find a pi-rule inelegant I think it’s kind of cool to have territory type games, where one can just adjust the starting score by not a lot in the case of 19x19 Go, and end up with a pretty fair game. I imagine it’s much harder to define both a deep game and a fair game without incorporating some gimmick such as komi or the pi rule to deal with a first move advantage.

I also quite like the 0.5 points in the komi in Go to avoid draws too, but obviously some people would prefer if a draw meant equally skilled (possibly at blundering) or perfect play potentially leading to a draw (although that makes standard x’s and o’s pretty sad and just because).

Not to derail things, of course, the post is quite interesting. Some other sligthly related ideas to do with komi bidding after some opening moves, and/or possibly using an AI to assess the position to suggest a fair komi.

With your first image, using the winrates do you have the komi set to 0 or 0.5 for Katago? (just out of curiosity for anyone trying it out)

I’m not sure it matters for me to add, but I’ll mention that with the OGS level 2 it suggests in a game with 0.5 komi for White K19 looks like it loses about 7 points (B+5.7 to W+1.8) while S18 loses about 5 points (B+5.7 to B+0.4). If one throws away the 0.5 komi I suppose they seem similar (I can’t imagine the score estimation or winrate is really this accurate this early). Does Katago output confidence intervals?

Would you not consider 2 stone pies then

I’ve been discussing pie rule Go with stone_defender and Samraku here for a couple of months, under the name “opening freedom Go” or “free opening Go”. I think he may have first proposed it in the new rule you’d like to see thread.

Oh, I see shinuito already mentioned that post.

1 Like

BTW, when are you going to add Tumbleweed #1 as your flair~?

With you, me and shinuito here I declare this a crypto-TW thread ^w^

Yes, I find both komi and pie-rules inelegant But they each have their own kind of elegance. Komi might be more practical, and pies might lead to more opening variety for instance.

Maybe I should have been more clear in the opening of the post that I was by no means trying to argue for playing in a certain way - but I think the idea of opening pies is fun, and while playing around with it we might learn some new things about regular go as well.

Now this is the part of komi that for some reason I don’t really like I much prefer playing with integer komi when possible. To connect back to the topic at hand, Chinese rules 0 komi + opening pie is one way to make draws very unlikely. (but not impossible of course)

(Again, I have nothing against playing with regular komi like a normal go player. I just put on different glasses when thinking about rules elegance than when I’m actually playing.)

0 komi for all analysis mentioned in the post!

It does I think, although I’m not quite sure how to interpret them. I’m also not entirely sure what kind of openings this KataGo has seen in training. There is some randomness but maybe first line moves are super rare? In which case a low playout estimate might not be very reliable. But with higher playouts I would trust it quite a lot on the big board. (I think it’s actually less trustworthy on small boards where the game becomes extremely tactical - this can probably be seen in the confidence intervals as well. I’ll try to share some screenshot of this tomorrow.)

You would indeed! This post was prompted by me thinking yesterday “I wonder if there is a fair 1-stone pie on small boards?” (I had looked at 19x19 a while ago and was annoyed that there wasn’t any more fair 1-stone pies).

But I really like the idea of playing from custom or random positions, and then possibly in conjunction with custom komi, so that you’re not restricted to fair positions. This sort of thing has been discussed in several places on the forum before, I think.

3 Likes

I think we should get together and play a pie rule tournament some time, or at least start a group. We’ve played random gaps pie rule, after all, so regular pie rule is less exotic.

Opening Freedom: pie rule, komi bidding and delayed bot komi group?

Don’t ask me, though – I couldn’t even make the Team League group myself, due to the two-groups-only rule. I really think that should be raised to at least five. Otherwise people can’t even make one group per year over a three-year period, which feels a bit stingy.

2 Likes

It feels like there should be some joke there about two eyes, or n’a OGS group tax. Some kind of puns, but I’m too tired

2 Likes

The rule should be “Five groups may live but the sixth will require moderator approval.”

3 Likes

Yes, data is limited, so higher playouts will be better, to help average out the neural net’s noisier judgments on that limited data.

Yes. There is also a TON more data on 19x19, so the tiny percentage of games that use heavy
enough randomization to include first line moves will be a tiny percentage of a ton more data, and therefore more data in total. And yes the effect of weird moves, measured in points, is going to be smoother on the larger boards since there’s a ton more possible choices to average over instead of going right away into critical tactics, and we know that holistic smooth positional judgement is the area where modern bots are at their best.

No, 7x7 is very hard still. Consider this: over the last decades, multiple strong amateurs and pros have spent years and years in total analyzing the 7x7 board. Yet despite those years and years of analysis, nobody (to my knowledge) realized that the optimal komi on 7x7 in Japanese rules is (probably) 8, until KataGo discovered the critical new variation for white in just the last couple of years. It’s still 9 on Chinese rules though.

So years and years of human analysis still didn’t fully understand the regular 7x7 where black opens on 4-4. There’s every reason to expect that pie rule openings with alternate komi will be at least as complex - i.e. more-than-years-and-years-of-human-time level of difficulty.

At this point, KataGo with a few 100ks of playouts and suitable settings (bump up the exploration coefficients) does probably play win/draw/loss-optimally on 7x7 for positions that can occur when one of the players is optimal. Meaning only the narrow tree of optimal lines, and the immediate refutations for falling off this narrow tree, and also KataGo only needs to choose an optimal move if there are multiple, rather than find them all.

But on this small board there is very, very little experience outside of the komi range from 7 to 10, and very, very little experience for moves outside of this narrow tree, including pie rule moves.

You could train KataGo to play them perfectly them if you wanted by adding it to the training. 7x7 is less than 1% of the data, but that and a tiny bit of manual help on a blind spot or two was enough to be probably optimal on the main line. To do the same with pie rule, you’d just need to add explicit code to force a high density of alternate komi and forced pie-rule openings, plus an opening book algo to ensure diversity and to counter blind spot lines, and let it go for a while. Ideally also with far more than 1% of the data, to learn a bit faster. But nobody has done that.

On 19x19 the situation is far better. KataGo has plenty of experience with isolated weird opening moves (due to the tiny percent of noise games), and has plenty of experience with no komi, reverse komi, or all sorts of random komi values. The scores and fair-komi values of the 2-2 point and most of the first line moves should be pretty good if you back them with a few thousands of playouts.

3 Likes

Try White 8 at d6: Review (online-go.com)

1 Like

Thanks for the insight @hexahedron and nice find @mark5000!

To follow-up @shinuito’s question about confidence intervals, below are two positions with very different standard deviations.

(please correct me @hexahedron if my simplified interpretation of these is wildly incorrect )

Complicated position with high standard deviation:

Many variations end in tricky capturing races (see the PV in lower left). The life and death of groups changes a lot between variations, but since the estimated score averages over these it can appear that the game is close, even though a close result is unlikely from here. The high standard deviation helps to tell the more complete story that there is a lot of uncertainty.

“Quiter” position with low standard deviation:

A mistake late in these variations may only cost a point or two (white is in no danger of dying*), so this position is much more likely to actually be a draw under perfect play.

*Well, KataGo playing white is in no danger of dying, I might

I don’t normally pay much attention to the standard deviation, I think partly because winrates, playouts and score estimates are easier to pretend to understand, and partly because those numbers are in colorful circles in Lizzie, while the standard deviation is not very attention-catching

I really should start looking at it more often, I think it can be very useful to distinguish between these two very different types of positions (where winrate and score estimate are similar, but in one case it’s because the score is close, and in one case it’s because KataGo is not sure who is going to win the capturing race).

3 Likes

The standard deviation of score is indeed a metric that has been under-studied, and yes likely due to its lack of prominence in GUIs and tools. Any more study and usage of it seems great.

2 Likes