Endgame position and miai value analysis

For lessons, as well as threads about specific moves, and anything else worth studying.
User avatar
Knotwilg
Oza
Posts: 2432
Joined: Fri Jan 14, 2011 6:53 am
Rank: KGS 2d OGS 1d Fox 4d
GD Posts: 0
KGS: Artevelde
OGS: Knotwilg
Online playing schedule: UTC 18:00 - 22:00
Location: Ghent, Belgium
Has thanked: 360 times
Been thanked: 1021 times
Contact:

Endgame position and miai value analysis

Post by Knotwilg »

Click Here To Show Diagram Code
[go]$$ Position at move 216
$$ ---------------------------------------
$$ | . . . O O X . . . . . O X X . . . . . |
$$ | . . . O X O O O O . . O O X . . X . . |
$$ | . . . O X X X O X O O . O X . X . X . |
$$ | O O . O c . . X X X O . O . . O X X . |
$$ | X O O . O X X . . . X X O . . O O O . |
$$ | X X O X X O . . . . X O O . . O X O . |
$$ | . X X . . . . . . . . X O . X O X O . |
$$ | . . . X . . . . . . . X X X . O X O . |
$$ | . a X . . . . . . . . . O X X X b X . |
$$ | . O X , . . . . . O . . O X . X X X . |
$$ | . O O X . . . . X . . . O X X O O X X |
$$ | . O X . X . . X . X X . X O O . O O X |
$$ | . O O X . . . O X . X . X O . O O X . |
$$ | . O X X . . . O X X O O X X O . O X X |
$$ | . . O X . . X X O O X X X . . . O X . |
$$ | . . O X O . X O O , O O O X X X X O O |
$$ | . . O O X X X O . O O . X O O O X O . |
$$ | . X O . O X X O O . . . X . . O O . . |
$$ | . O . O O O X X X O . . . . . . . . . |
$$ ---------------------------------------[/go]
I'm taking this position from an AI Sensei discussion. I'd like to get anyone's idea on what's the biggest endgame move: A or B? In particular I'd like to get expert opinion on the miai values. Here's my analysis:
A is ambiguous. If considered White's sente, then Black makes 3 points by playing there. White's follow-up, if Black doesn't answer White A, is also about 3 points. So the miai value is 3/1 or 6/2 = 3.

B is gote. A White play would shift the count by 4+1/6 so the miai value is 2+1/12.

By miai value analysis A is bigger than B. But when I verify that by playing out the board, Black B seems to give a result that's 1 point better.
C plays a role: it's also ambiguous, being a 2 point move with a 2 point follow-up.

If these 3 are the only moves on the board then let's see the difference
Click Here To Show Diagram Code
[go]$$B
$$ ---------------------------------------
$$ | . . . O O X . . . . . O X X . . . . . |
$$ | . . . O X O O O O . . O O X . . X . . |
$$ | . . . O X X X O X O O . O X . X . X . |
$$ | O O . O 3 . . X X X O . O . . O X X . |
$$ | X O O 4 O X X . . . X X O . . O O O . |
$$ | X X O X X O . . . . X O O . . O X O . |
$$ | C X X C . . . . . . . X O . X O X O . |
$$ | C C C X . . . . . . . X X X . O B O . |
$$ | . 1 X . . . . . . . . . O X X X 2 X . |
$$ | . O X , . . . . . O . . O X . X X X . |
$$ | S O O X . . . . X . . . O X X O O X X |
$$ | S O X . X . . X . X X . X O O . O O X |
$$ | . O O X . . . O X . X . X O . O O X . |
$$ | . O X X . . . O X X O O X X O . O X X |
$$ | . . O X . . X X O O X X X . . . O X . |
$$ | . . O X O . X O O , O O O X X X X O O |
$$ | . . O O X X X O . O O . X O O O X O . |
$$ | . X O . O X X O O . . . X . . O O . . |
$$ | . O . O O O X X X O . . . . . . . . . |
$$ ---------------------------------------[/go]
Black recaptures at BB

Click Here To Show Diagram Code
[go]$$ Position at move 216
$$ ---------------------------------------
$$ | . . . O O X . . . . . O X X . . . . . |
$$ | . . . O X O O O O . . O O X . . X . . |
$$ | . . . O X X X O X O O . O X . X . X . |
$$ | O O . O 3 . . X X X O . O . . O X X . |
$$ | X O O 5 O X X . . . X X O . . O O O . |
$$ | X X O X X O . . . . X O O . . O X O . |
$$ | . X X C . . . . . . . X O . X O X O . |
$$ | . 4 . X . . . . . . . X X X . O X O . |
$$ | . 2 X . . . . . . . . . O X X X 1 X . |
$$ | S O X , . . . . . O . . O X . X X X . |
$$ | S O O X . . . . X . . . O X X O O X X |
$$ | S O X . X . . X . X X . X O O . O O X |
$$ | . O O X . . . O X . X . X O . O O X . |
$$ | . O X X . . . O X X O O X X O . O X X |
$$ | . . O X . . X X O O X X X . . . O X . |
$$ | . . O X O . X O O , O O O X X X X O O |
$$ | . . O O X X X O . O O . X O O O X O . |
$$ | . X O . O X X O O . . . X . . O O . . |
$$ | . O . O O O X X X O . . . . . . . . . |
$$ ---------------------------------------[/go]
Between these two

In situation A Black is 5 points better
In situation B White is 2 + 2/3 points better
In situation C White is 2 points better
Gomoto
Gosei
Posts: 1733
Joined: Sun Nov 06, 2016 6:56 am
GD Posts: 0
Location: Earth
Has thanked: 621 times
Been thanked: 310 times

Re: Endgame position and miai value analysis

Post by Gomoto »

Click Here To Show Diagram Code
[go]$$ Position at move 216
$$ ---------------------------------------
$$ | . . . O O X . . . . . O X X . . . . . |
$$ | . . . O X O O O O . . O O X . . X . . |
$$ | . . . O X X X O X O O . O X . X . X . |
$$ | O O . O . . . X X X O . O . . O X X . |
$$ | X O O . O X X . . . X X O . . O O O . |
$$ | X X O X X O . . . . X O O . . O X O . |
$$ | . X X . . . . . . . . X O . X O X O . |
$$ | . . . X . . . . . . . X X X . O X O . |
$$ | . . X . . . . . . . . . O X X X . X . |
$$ | . O X , . . . . . O . . O X . X X X . |
$$ | . O O X . . . . X . . . O X X O O X X |
$$ | . O X B X . . X . X X . X O O . O O X |
$$ | . O O X . . . O X . X . X O . O O X . |
$$ | . O X X . . . O X X O O X X O . O X X |
$$ | . . O X . . X X O O X X X . . . O X . |
$$ | . . O X O . X O O , O O O X X X X O O |
$$ | . . O O X X X O . O O . X O O O X O . |
$$ | . X O . O X X O O . . . X . . O O . . |
$$ | . O . O O O X X X O . . . . . . . . . |
$$ ---------------------------------------[/go]
User avatar
Knotwilg
Oza
Posts: 2432
Joined: Fri Jan 14, 2011 6:53 am
Rank: KGS 2d OGS 1d Fox 4d
GD Posts: 0
KGS: Artevelde
OGS: Knotwilg
Online playing schedule: UTC 18:00 - 22:00
Location: Ghent, Belgium
Has thanked: 360 times
Been thanked: 1021 times
Contact:

Re: Endgame position and miai value analysis

Post by Knotwilg »

It's really an endgame question. Not "what's the most secure way to carry the 20+ lead into victory"
Gomoto
Gosei
Posts: 1733
Joined: Sun Nov 06, 2016 6:56 am
GD Posts: 0
Location: Earth
Has thanked: 621 times
Been thanked: 310 times

Re: Endgame position and miai value analysis

Post by Gomoto »

move d is not the best and not the worst of (a,b,d) :-)
a > b in my humble opinion
dany
Dies with sente
Posts: 121
Joined: Fri Dec 20, 2019 2:44 am
Rank: IGS 4 dan
GD Posts: 0
Has thanked: 36 times
Been thanked: 12 times

Re: Endgame position and miai value analysis

Post by dany »

Knotwilg wrote:
Click Here To Show Diagram Code
[go]$$ Position at move 216
$$ ---------------------------------------
$$ | . . . O O X . . . . . O X X . . . . . |
$$ | . . . O X O O O O . . O O X . . X . . |
$$ | . . . O X X X O X O O . O X . X . X . |
$$ | O O . O c . . X X X O . O . . O X X . |
$$ | X O O . O X X . . . X X O . . O O O . |
$$ | X X O X X O . . . . X O O . . O X O . |
$$ | . X X . . . . . . . . X O . X O X O . |
$$ | . . . X . . . . . . . X X X . O X O . |
$$ | . a X . . . . . . . . . O X X X b X . |
$$ | . O X , . . . . . O . . O X . X X X . |
$$ | . O O X . . . . X . . . O X X O O X X |
$$ | . O X . X . . X . X X . X O O . O O X |
$$ | . O O X . . . O X . X . X O . O O X . |
$$ | . O X X . . . O X X O O X X O . O X X |
$$ | . . O X . . X X O O X X X . . . O X . |
$$ | . . O X O . X O O , O O O X X X X O O |
$$ | . . O O X X X O . O O . X O O O X O . |
$$ | . X O . O X X O O . . . X . . O O . . |
$$ | . O . O O O X X X O . . . . . . . . . |
$$ ---------------------------------------[/go]
I'm taking this position from an AI Sensei discussion. I'd like to get anyone's idea on what's the biggest endgame move: A or B? In particular I'd like to get expert opinion on the miai values. Here's my analysis:

A miai value is about 2.8
B miai value is 1.92 https://senseis.xmp.net/?MiaiValuesList ... o199#toc16
Knotwilg wrote: By miai value analysis A is bigger than B. But when I verify that by playing out the board, Black B seems to give a result that's 1 point better.
C plays a role: it's also ambiguous, being a 2 point move with a 2 point follow-up.
No, B is 1 point worse. White 4 move from A sequence is a mistake
User avatar
Knotwilg
Oza
Posts: 2432
Joined: Fri Jan 14, 2011 6:53 am
Rank: KGS 2d OGS 1d Fox 4d
GD Posts: 0
KGS: Artevelde
OGS: Knotwilg
Online playing schedule: UTC 18:00 - 22:00
Location: Ghent, Belgium
Has thanked: 360 times
Been thanked: 1021 times
Contact:

Re: Endgame position and miai value analysis

Post by Knotwilg »

OK so B is 1.92 or 1+11/12 which is well documented.
Let me then try getting to your 2.8 for A, reducing the diagram to the local position and taking a little of the complexity out (perhaps affecting the value you got)
Click Here To Show Diagram Code
[go]$$B
$$ | O O O O O .
$$ | X X O X X X
$$ | C X X C . .
$$ | C C C X . .
$$ | a 1 X . . .
$$ | b O X , . .
$$ | S O X . . .[/go]
This branch is easy: we can assume A and B as boundaries since the hanes cancel out. The net result (count) is 4.
Click Here To Show Diagram Code
[go]$$W
$$ | O O O O O .
$$ | X X O X X X
$$ | C X X C . .
$$ | a 2 C X . .
$$ | b 1 X . . .
$$ | S O X , . .
$$ | S O X . . .[/go]
this is also easy for the same reason. The count is 1.
Click Here To Show Diagram Code
[go]$$W
$$ | O O O O O .
$$ | X X O X X X
$$ | . X X C . .
$$ | a 3 b X . .
$$ | S 1 X . . .
$$ | S O X , . .
$$ | S O X . . .[/go]
Here I'm giving both 1/2 a chance to play A, so for White to make 3 points instead of 2, and also 1/2 a chance to play B, so for Black to make 1 point instead of 0. On average, the count is -2

So we have, with value and (count)

2.25 (1.75)
/ \
1.5(-0.5) (4)
/ \
(-2)(1)

The value of A is 2.25 and the count is 1.75

Could it be that your 2.8 is a rounding of 2.75 and that you have mistakenly calculated the average between the value 1.5 and the count 4?

I think it's more likely that you are the expert and I made a mistake. Please correct!
dany
Dies with sente
Posts: 121
Joined: Fri Dec 20, 2019 2:44 am
Rank: IGS 4 dan
GD Posts: 0
Has thanked: 36 times
Been thanked: 12 times

Re: Endgame position and miai value analysis

Post by dany »

Knotwilg wrote:
Click Here To Show Diagram Code
[go]$$W
$$ | O O O O O .
$$ | X X O X X X
$$ | . X X C . .
$$ | a 3 b X . .
$$ | S 1 X . . .
$$ | S O X , . .
$$ | S O X . . .[/go]
Here I'm giving both 1/2 a chance to play A, so for White to make 3 points instead of 2, and also 1/2 a chance to play B, so for Black to make 1 point instead of 0. On average, the count is -2
In similar positions b > a. It is easy to verify this by constructing https://senseis.xmp.net/?DifferenceGame
So black or white play b instead of a

And in the current position white b is sente
Knotwilg wrote: So we have, with value and (count)

2.25 (1.75)
/ \
1.5(-0.5) (4)
/ \
(-2)(1)

The value of A is 2.25 and the count is 1.75

Could it be that your 2.8 is a rounding of 2.75 and that you have mistakenly calculated the average between the value 1.5 and the count 4?

I think it's more likely that you are the expert and I made a mistake. Please correct!
I'm definitely not an expert and I don't fully understand how all this counts.

But after reading the articles https://senseis.xmp.net/?MiaiCountingWithTrees and https://senseis.xmp.net/?MiaiValuesList%2FDiscussion (especially the section "For instance, suppose that you start with this tree"), something cleared up and now I understand the calculation process better.
Click Here To Show Diagram Code
[go]$$W
$$ | O O O O O .
$$ | X X O X X X
$$ | . X X . . .
$$ | . 2 . X . .
$$ | . 1 X . . .
$$ | . O X , . .
$$ | . O X . . .[/go]
After White 1, the temperature has increased. Therefore it's sente and Black has to answer 2.
So A miai value is (4+1)/2 = 2.5
User avatar
Knotwilg
Oza
Posts: 2432
Joined: Fri Jan 14, 2011 6:53 am
Rank: KGS 2d OGS 1d Fox 4d
GD Posts: 0
KGS: Artevelde
OGS: Knotwilg
Online playing schedule: UTC 18:00 - 22:00
Location: Ghent, Belgium
Has thanked: 360 times
Been thanked: 1021 times
Contact:

Re: Endgame position and miai value analysis

Post by Knotwilg »

Thanks a lot!

But still not sure: how does the temperature increase?

Let me explain the tree in words:

The count of Black first is 4
The count of White first is -0.5, because next White going first the count is -2 and Black going first the count is 1; (-2+1)/2=-0.5
Therefore the value of the second move is 1.5 (moving the count from -0.5 to either -2 or 1)

The count of the original position is (4-0.5)/2 = 1.75
Therefore the value of the first move is 2.25 (moving the count to either 4 or -0.5)

The value of the first move (2.25) is larger than the value of the second move (1.5)
So the temperature decreases and the move is gote.
dany
Dies with sente
Posts: 121
Joined: Fri Dec 20, 2019 2:44 am
Rank: IGS 4 dan
GD Posts: 0
Has thanked: 36 times
Been thanked: 12 times

Re: Endgame position and miai value analysis

Post by dany »

Knotwilg wrote: But still not sure: how does the temperature increase?
Maybe we are talking about different "temperatures". Mine from https://senseis.xmp.net/?MiaiCountingWithTrees.
Temperature = (blackcount-Whitecount)/(blacktally-whitetally)
And calc from bottom to top.

Follow the algorithm from https://senseis.xmp.net/?MiaiValuesList%2FDiscussion (the section "For instance, suppose that you start with this tree").

1) build a tree of moves assuming all moves are gote
2) check that the temperature in the tree decreases from top to bottom
3) if at some node constraint 2) is violated, then the tree of moves (and values) is inconsistent and this move is sente
4) if 3) then "cut" branches and recalc values and temperatures. make the tree consistent
User avatar
Knotwilg
Oza
Posts: 2432
Joined: Fri Jan 14, 2011 6:53 am
Rank: KGS 2d OGS 1d Fox 4d
GD Posts: 0
KGS: Artevelde
OGS: Knotwilg
Online playing schedule: UTC 18:00 - 22:00
Location: Ghent, Belgium
Has thanked: 360 times
Been thanked: 1021 times
Contact:

Re: Endgame position and miai value analysis

Post by Knotwilg »

dany wrote:
Knotwilg wrote: But still not sure: how does the temperature increase?
Maybe we are talking about different "temperatures". Mine from https://senseis.xmp.net/?MiaiCountingWithTrees.
Temperature = (blackcount-Whitecount)/(blacktally-whitetally)
And calc from bottom to top.

Follow the algorithm from https://senseis.xmp.net/?MiaiValuesList%2FDiscussion (the section "For instance, suppose that you start with this tree").

1) build a tree of moves assuming all moves are gote
2) check that the temperature in the tree decreases from top to bottom
3) if at some node constraint 2) is violated, then the tree of moves (and values) is inconsistent and this move is sente
4) if 3) then "cut" branches and recalc values and temperatures. make the tree consistent
Hehe :) I'm under the - possibly false - belief that is exactly what I did ...
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: Endgame position and miai value analysis

Post by lightvector »

Knotwilg wrote:
Click Here To Show Diagram Code
[go]$$W
$$ | O O O O O .
$$ | X X O X X X
$$ | . X X C . .
$$ | a 3 b X . .
$$ | S 1 X . . .
$$ | S O X , . .
$$ | S O X . . .[/go]
Here I'm giving both 1/2 a chance to play A, so for White to make 3 points instead of 2, and also 1/2 a chance to play B, so for Black to make 1 point instead of 0. On average, the count is -2
I'm skeptical of this, unless this is intended to be an approximation rather than to be exactly accurate?

Playing A and B here are not independently 50-50able, because playing A may affect the liberties that determine whether B is sente atari on the whole group, and vice versa whoever plays B first affects the value of the situation at A.

Additionally, if we completely ignore black's possible liberty shortage from B and just focus on the shape at A by itself, this is not a situation where you can take the average of 3 and 2 points for white. This is because if black plays A first and white blocks, that itself is already a slight local gain and the temperature drops, leaving a remaining ko mouth where black can tenuki. (See the fifth diagram on the 0.67 section at https://senseis.xmp.net/?MiaiValuesList%2F000To099#toc7, "Make ko"). The value of this resulting ko mouth position has a 1/3 in it, so if you don't end up with a factor of 3 in the denominator finally after doing the full calculation, something may be off.

For an accurate evaluation of the miai value, rather than just an approximation, due to these details you may need to expand the tree out a bit further. (And in the process, determine actually what the correct first move for each side is here!)
User avatar
Knotwilg
Oza
Posts: 2432
Joined: Fri Jan 14, 2011 6:53 am
Rank: KGS 2d OGS 1d Fox 4d
GD Posts: 0
KGS: Artevelde
OGS: Knotwilg
Online playing schedule: UTC 18:00 - 22:00
Location: Ghent, Belgium
Has thanked: 360 times
Been thanked: 1021 times
Contact:

Re: Endgame position and miai value analysis

Post by Knotwilg »

lightvector wrote:
Knotwilg wrote:
Click Here To Show Diagram Code
[go]$$W
$$ | O O O O O .
$$ | X X O X X X
$$ | . X X C . .
$$ | a 3 b X . .
$$ | S 1 X . . .
$$ | S O X , . .
$$ | S O X . . .[/go]
Here I'm giving both 1/2 a chance to play A, so for White to make 3 points instead of 2, and also 1/2 a chance to play B, so for Black to make 1 point instead of 0. On average, the count is -2
I'm skeptical of this, unless this is intended to be an approximation rather than to be exactly accurate?

Playing A and B here are not independently 50-50able, because playing A may affect the liberties that determine whether B is sente atari on the whole group, and vice versa whoever plays B first affects the value of the situation at A.

Additionally, if we completely ignore black's possible liberty shortage from B and just focus on the shape at A by itself, this is not a situation where you can take the average of 3 and 2 points for white. This is because if black plays A first and white blocks, that itself is already a slight local gain and the temperature drops, leaving a remaining ko mouth where black can tenuki. (See the fifth diagram on the 0.67 section at https://senseis.xmp.net/?MiaiValuesList%2F000To099#toc7, "Make ko"). The value of this resulting ko mouth position has a 1/3 in it, so if you don't end up with a factor of 3 in the denominator finally after doing the full calculation, something may be off.

For an accurate evaluation of the miai value, rather than just an approximation, due to these details you may need to expand the tree out a bit further. (And in the process, determine actually what the correct first move for each side is here!)
Thanks

I gave it a try here: https://senseis.xmp.net/?BQM606
Schachus
Lives with ko
Posts: 211
Joined: Wed Jul 01, 2015 11:02 am
Rank: KGS 1k EGF 2k
GD Posts: 0
KGS: Schachus12
Has thanked: 16 times
Been thanked: 62 times

Re: Endgame position and miai value analysis

Post by Schachus »

In the diagram undertitled WWBW, imo white 5 should be destroying the eye at a instead of blocking the side, which also protects the side at the same time, because of blacks damezumari. This is also the reason why imo black 4 should also be making the eye at a instead of a hane on the side)
User avatar
Knotwilg
Oza
Posts: 2432
Joined: Fri Jan 14, 2011 6:53 am
Rank: KGS 2d OGS 1d Fox 4d
GD Posts: 0
KGS: Artevelde
OGS: Knotwilg
Online playing schedule: UTC 18:00 - 22:00
Location: Ghent, Belgium
Has thanked: 360 times
Been thanked: 1021 times
Contact:

Re: Endgame position and miai value analysis

Post by Knotwilg »

Schachus wrote:In the diagram undertitled WWBW, imo white 5 should be destroying the eye at a instead of blocking the side, which also protects the side at the same time, because of blacks damezumari. This is also the reason why imo black 4 should also be making the eye at a instead of a hane on the side)
Thanks for spotting it. I changed accordingly.
dany
Dies with sente
Posts: 121
Joined: Fri Dec 20, 2019 2:44 am
Rank: IGS 4 dan
GD Posts: 0
Has thanked: 36 times
Been thanked: 12 times

Re: Endgame position and miai value analysis

Post by dany »

Schachus wrote:In the diagram undertitled WWBW, imo white 5 should be destroying the eye at a instead of blocking the side, which also protects the side at the same time, because of blacks damezumari. This is also the reason why imo black 4 should also be making the eye at a instead of a hane on the side)
Yes
dany wrote:
Knotwilg wrote:
Click Here To Show Diagram Code
[go]$$W
$$ | O O O O O .
$$ | X X O X X X
$$ | . X X C . .
$$ | a 3 b X . .
$$ | S 1 X . . .
$$ | S O X , . .
$$ | S O X . . .[/go]
Here I'm giving both 1/2 a chance to play A, so for White to make 3 points instead of 2, and also 1/2 a chance to play B, so for Black to make 1 point instead of 0. On average, the count is -2
In similar positions b > a. It is easy to verify this by constructing https://senseis.xmp.net/?DifferenceGame
So black or white play b instead of a
Post Reply