BASIC endgame theory for beginner that actually is useful

If you're new to the game and have questions, post them here.
User avatar
topazg
Tengen
Posts: 4511
Joined: Wed Apr 21, 2010 3:08 am
Rank: Nebulous
GD Posts: 918
KGS: topazg
Location: Chatteris, UK
Has thanked: 1579 times
Been thanked: 650 times
Contact:

Re: BASIC endgame theory for beginner that actually is usefu

Post by topazg »

Numsgil wrote:Next you say 'b' is worth 1 + 1/2. Where does 1/2 come from?


When computing a gote move, you have the value of that move, plus half the next move if gote (and full value if sente), plus half of half the third move (if gote) or half the third move (if sente) etc.
User avatar
Numsgil
Lives in gote
Posts: 614
Joined: Wed Apr 21, 2010 10:07 am
Rank: 1 Kyu KGS
GD Posts: 0
KGS: Numsgil
Has thanked: 28 times
Been thanked: 65 times

Re: BASIC endgame theory for beginner that actually is usefu

Post by Numsgil »

topazg wrote:
Numsgil wrote:Next you say 'b' is worth 1 + 1/2. Where does 1/2 come from?


When computing a gote move, you have the value of that move, plus half the next move if gote (and full value if sente), plus half of half the third move (if gote) or half the third move (if sente) etc.


"Half" isn't a great way of thinking about it. I prefer "averaging" my best move and his best move. But yeah, that's what I do for positions. But you can't just take it for granted that "beginners" understand that. Especially on non-trivial problems with a decision tree that's 3 or 4 moves deep.

Also, how do you actually calculate it in a game? I can do accurate end game calculations only by drawing out the decision tree and each position on graph paper, and even then it's a bit of a battle with the numbers and double checking the work. Doing it properly in your head for non trivial positions seems really hard. You're basically doing a depth first traversal of a tree in your head! So unless there's some clever mnemonic tricks I don't know, you're required to store in your head the entire tree, plus information about whether you've already visited a node or not, plus the values of the nodes all the way up to the root for the current node you're evaluating.

My guess is that there's a clever way to traverse the tree without requiring a great deal of storage for the current state of the traversal, but if there is I haven't figured it out.

And actually, thinking about it, I have a question I dont' actually know the answer for even on paper: how do you count a position where you can make a series of 1 point gote moves that end in a 30 point sente move for you? Unless it's very early in the game, your opponent isn't going to let you make that 30 point sente exchange. Which means that the "gote" move before it is actually a sente move your opponent will respond to. But now imagine decreasing that 30 point value to something like 5 points. Do you count or not count that 5 points? It's actual value depends on the largest move your opponent has available at the time you make the 1 point gote move that has the 5 point sente followup. So do you remember two different values for the count, with a threshold for when it switches from one to the other? What if the position is more complicated and there's many such "false sente" moves that may or may not make the gote move above them sente depending on the global situation?
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: BASIC endgame theory for beginner that actually is usefu

Post by Bill Spight »

Numsgil wrote:Also, how do you actually calculate it in a game?


Memory and experience help. Also, you seldom have to be precise. :)

I can do accurate end game calculations only by drawing out the decision tree and each position on graph paper, and even then it's a bit of a battle with the numbers and double checking the work. Doing it properly in your head for non trivial positions seems really hard. You're basically doing a depth first traversal of a tree in your head! So unless there's some clever mnemonic tricks I don't know, you're required to store in your head the entire tree,


Once you have evaluated a node, you can (usually) forget the tree below it. Also, if there are no kos below a node, its value lies between the results where Black plays first and White plays first. While that seldom gives you the answer, those numbers help keep you oriented, or let you make a quick estimate.

And actually, thinking about it, I have a question I dont' actually know the answer for even on paper: how do you count a position where you can make a series of 1 point gote moves that end in a 30 point sente move for you?


There is a trick. You can evaluate it like a sente. Assume that you make a play and your opponent replies. :)

But now imagine decreasing that 30 point value to something like 5 points. Do you count or not count that 5 points? It's actual value depends on the largest move your opponent has available at the time you make the 1 point gote move that has the 5 point sente followup.


You are making it too hard for yourself. The point of the theory is to provide heuristics that usually work, since it is impossible to read out the whole tree in time. (It can also guide you in reading the whole tree when that is possible, by giving you a line that is correct or nearly so.)

So do you remember two different values for the count, with a threshold for when it switches from one to the other?


The count will be the same. :)

What if the position is more complicated and there's many such "false sente" moves that may or may not make the gote move above them sente depending on the global situation?


That is a separate topic from evaluation. It is dealt with in some detail on SL: http://senseis.xmp.net/?GoInfinitesimals :)
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
User avatar
jts
Oza
Posts: 2662
Joined: Sat Sep 18, 2010 4:17 pm
Rank: kgs 6k
GD Posts: 0
Has thanked: 310 times
Been thanked: 632 times

Re: BASIC endgame theory for beginner that actually is usefu

Post by jts »

topazg wrote:
jts wrote:Wait, I don't understand. I thought in the second diagram Bill shows, White loses a point for playing the second-largest play.


Bill cheated and changed the diagram ;). The B+8 lines are not from the same position as the B+7 lines!

Yes, that's what got me. I actually had to open two windows so that I could look at both sets of diagrams at once... I couldn't figure out what he was doing differently! :oops:

Thanks for the examples, Bill.
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: BASIC endgame theory for beginner that actually is usefu

Post by Bill Spight »

topazg wrote:Bill cheated and changed the diagram ;). The B+8 lines are not from the same position as the B+7 lines!


What I did:

I lengthened the C corridor, adding 15/16 of a point to Black. That made the count 8 7/8. White to play can "round down" to 8.

The orthodox play is to save the White stone, gaining 1 point to make the count 7 7/8, which Black can "round up" to 8. But playing in one of the long corridors would gain 15/16 of a point to make the count 7 15/16. That is enough so that Black can only "round up" to 8, as well. ;)
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
User avatar
Toge
Lives in gote
Posts: 313
Joined: Tue May 18, 2010 11:11 am
Rank: KGS dan
GD Posts: 0
KGS: Toge
Has thanked: 36 times
Been thanked: 63 times

Re: BASIC endgame theory for beginner that actually is usefu

Post by Toge »

Math is difficult, especially when it comes to early stages of endgame when there are still many possibilities to play. It is important to determine what each player stands to lose and gain. I use two rules of thumb:

1. Positions where either player can gain are important
2. Extend towards empty space, rather than cramped space (that means moves with follow-ups are good!)
User avatar
Magicwand
Tengen
Posts: 4844
Joined: Wed Apr 21, 2010 5:26 am
Rank: Wbaduk 7D
GD Posts: 0
KGS: magicwand
Tygem: magicwand
Wbaduk: rlatkfkd
DGS: magicwand
OGS: magicwand
Location: Mechanicsburg, PA
Has thanked: 62 times
Been thanked: 504 times

Re: BASIC endgame theory for beginner that actually is usefu

Post by Magicwand »

Numsgil wrote:MW, I don't actually find this useful, just FYI. I know where the numbers come from from my own understanding of the endgame, but that's based on computer science ideas like decision tree and recursive summing from the leaves to the root. I'd be surprised if that's how you think, though.

So I'm challenging you to take your example and try again, but this time be really really aggressive about saying where the numbers are coming from.

when i play serious game with plenty of time i try to calculate all but i mostly play casual game.
most time it i dont need to count because i usually know which is begger by experience.

i think bill is better than me on endgame. i usually dont count every points accurately unless i have to.
but i wanted to let beginner know how i do my calculation.
if i get postive feed back i will try to give more example of endgame that is basic but necessary.

this first example is a building block basic skills you will need for next example i will give later.
"The more we think we know about
The greater the unknown"

Words by neil peart, music by geddy lee and alex lifeson
User avatar
topazg
Tengen
Posts: 4511
Joined: Wed Apr 21, 2010 3:08 am
Rank: Nebulous
GD Posts: 918
KGS: topazg
Location: Chatteris, UK
Has thanked: 1579 times
Been thanked: 650 times
Contact:

Re: BASIC endgame theory for beginner that actually is usefu

Post by topazg »

Numsgil wrote:"Half" isn't a great way of thinking about it. I prefer "averaging" my best move and his best move. But yeah, that's what I do for positions. But you can't just take it for granted that "beginners" understand that. Especially on non-trivial problems with a decision tree that's 3 or 4 moves deep.


My gut feeling is, unless you're playing at high dan levels, you're trying too hard.

Numsgil wrote:Also, how do you actually calculate it in a game? I can do accurate end game calculations only by drawing out the decision tree and each position on graph paper, and even then it's a bit of a battle with the numbers and double checking the work. Doing it properly in your head for non trivial positions seems really hard. You're basically doing a depth first traversal of a tree in your head! So unless there's some clever mnemonic tricks I don't know, you're required to store in your head the entire tree, plus information about whether you've already visited a node or not, plus the values of the nodes all the way up to the root for the current node you're evaluating.

My guess is that there's a clever way to traverse the tree without requiring a great deal of storage for the current state of the traversal, but if there is I haven't figured it out.


The level of accuracy you are trying to work to is unnecessary. Ball park figures and being slightly less accurate make for a much more playable endgame. You lose some accuracy in tiny precision, in favour of being able to calculate all the endgame options on the board at a given time. I've tried to come up with a useful example that explains how I approach it, and tried to respond to your threshold question. Here's a bland position:

Click Here To Show Diagram Code
[go]$$Wcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O . . , O X . . . , . . . |
$$ | . . . . . . . . . . O X . X . . . . . |
$$ | . . . . . . . . . . a O X . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ ---------------------------------------[/go]


What's the value of "a"? Here's how I evaluate it. If I'm Black, I can assume I can ignore White defending, but do I keep sente if I play there? This is the difference between gote and reverse sente for White. So, let's have a look:

Click Here To Show Diagram Code
[go]$$Wcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O x x x O X y y y , . . . |
$$ | . . . . . . . x x x O X y X y . . . . |
$$ | . . . . . . . x x x 1 O X y y . . . . |
$$ | . . . . . . . x x x x W B y y . . . . |
$$ ---------------------------------------[/go]


If White defends, we can safely assume that both remaining points at the bottom are equal size gote moves. So, it's easier to just assume that the middle ground is true (where neither gets to hane). White here has 13 points, Black has 9.

Click Here To Show Diagram Code
[go]$$Bcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O . . , O X . . . , . . . |
$$ | . . . . . . . . . . O X . X . . . . . |
$$ | . . . . . . . . . 2 1 C X . . . . . . |
$$ | . . . . . . . . . a . 3 . . . . . . . |
$$ ---------------------------------------[/go]


In this position, the descent to "a" is unlikely to be sente for White until much later in the endgame, as Black is unlikely to respond (or is he, see below!). As a result, White can consider "a" reverse sente, rather than sente, and assume the following position:

Click Here To Show Diagram Code
[go]$$Bcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O x x x O X y y y , . . . |
$$ | . . . . . . . x x x O X y X y . . . . |
$$ | . . . . . . . x 8 2 1 C X y y . . . . |
$$ | . . . . . . . x 6 5 7 3 y y y . . . . |
$$ ---------------------------------------[/go]


So, was the descent sente? If so, that makes a good difference (turns it into a 4 point gote move)

Click Here To Show Diagram Code
[go]$$Bcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O . . , O X . . . , . . . |
$$ | . . . . . . . . . . O X . X . . . . . |
$$ | . . . . . . . . . 2 1 C X . . . . . . |
$$ | . . . . . . . . . 4 a 3 b . . . . . . |
$$ ---------------------------------------[/go]


"a" is now comparatively small. It's worth 1 point to Black, either as reverse sente because he's going to connect, or as 2- points gote when he lets White play at "a", then capture, connecting at "b" (the - is because of the remaining 0.5 point ko - I find this easier than considering it a third of a point, but I know Bill uses more accuracy than this). Because of this, the value of the original descent is 2 points reverse sente rather than sente, and it's the right move only if it is the biggest remaining point on the board. Because the threat of Black playing there and then coming underneath with the atari is so large, you can assume Black will definitely get it in sente, leading to a conclusion that, for White to block is a 8 point gote move. EDIT: Actually, as gaius pointed out, :w6: is normally unreasonable, and White normally has to pull back one more before blocking leading to 2 more net points lost and turning the move into 10 point gote. Thanks gaius!

So, the net difference is 8 points, with White now having 8 (instead of 13) and Black having 12 (instead of 9). As a result, defending in this position is commonly thought of as a 8 point gote move. What about this?

Click Here To Show Diagram Code
[go]$$Wcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O . . , O X . . . , . . . |
$$ | . . . . . . . . W . O X . X . . . . . |
$$ | . . . . . . . . . . a O X . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ ---------------------------------------[/go]


Now, we can assume that Black has no sente followup, and the final position (because the bottom edge is gote for both) can be assumed to be comparing the following:

Click Here To Show Diagram Code
[go]$$Bcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O x x x O X y y y , . . . |
$$ | . . . . . . . x O x O X y X y . . . . |
$$ | . . . . . . . x x 2 1 C X y y . . . . |
$$ | . . . . . . . x x W B 3 y y y . . . . |
$$ ---------------------------------------[/go]


Click Here To Show Diagram Code
[go]$$Wcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O x x x O X y y y , . . . |
$$ | . . . . . . . x O x O X y X y . . . . |
$$ | . . . . . . . x x x 1 O X y y . . . . |
$$ | . . . . . . . x x x x W B y y . . . . |
$$ ---------------------------------------[/go]


Now, White has either 9 or 12 points, and Black has either 12 or 9 points. This is therefore a 6 point gote move.

How do you decide whether to play gote or reverse sente? Well, the precise calculations can be insane. In reality, the reverse sente move gains you half a turn. So, if there are 3 moves left: a 3 point reverse sente, a 3 point gote, and another 3 point gote, playing the reverse sente gets you 6 points to your opponent's 3 (as you get the third move), and playing a gote move gets you 3 points to your opponent's 6. In reality, playing reverse sente leaves the biggest gote to your opponent, after which you get the second biggest gote. If you play the biggest gote, your opponent gets your reverse sente (as his sente) and second biggest gote. The difference being, when you get them both it's his turn, and when he gets them both it's your turn. This move parity difference, much the same as 0+0.5+0.25+0.125+0.0625 etc = 1, means that reverse sente is considered to be double the value of gote.

So, fun final positions to think about and evaluate:

Edit, moved to here!
User avatar
gaius
Lives in gote
Posts: 476
Joined: Tue Apr 27, 2010 2:55 am
Rank: Dutch 2 dan
GD Posts: 56
KGS: hopjesvla
Has thanked: 193 times
Been thanked: 83 times

Re: BASIC endgame theory for beginner that actually is usefu

Post by gaius »

Nice post, topazg! One footnote:
Click Here To Show Diagram Code
[go]$$Bcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O x x x O X y y y , . . . |
$$ | . . . . . . . x x x O X y X y . . . . |
$$ | . . . . . . . x 8 2 1 C X y y . . . . |
$$ | . . . . . . . x 6 5 7 3 y y y . . . . |
$$ ---------------------------------------[/go]

This diagramme assumes that white can play :w8:, risking a very heavy ko. Usually, unless white has zillions of ko threats, I just assume that white cannot do this; thus, the value of the capture becomes 10 points gote rather than 8. It might just be enough to cost you that 0.5-point loss ;)
Last edited by gaius on Fri Jan 28, 2011 4:28 am, edited 1 time in total.
My name is Gijs, from Utrecht, NL.

When in doubt, play the most aggressive move
User avatar
topazg
Tengen
Posts: 4511
Joined: Wed Apr 21, 2010 3:08 am
Rank: Nebulous
GD Posts: 918
KGS: topazg
Location: Chatteris, UK
Has thanked: 1579 times
Been thanked: 650 times
Contact:

Re: BASIC endgame theory for beginner that actually is usefu

Post by topazg »

Many thanks, you are quite right, the ko is fairly large. I've actually gone and moved the questions to another thread (see edit at the end of the post). Would you like me to move any of your post around, or would you like to do it yourself?

Position Gaius is referring to:

Click Here To Show Diagram Code
[go]$$Bcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O . . . O X . . . , . . . |
$$ | . . . . . . . . . . O X . X . . . . . |
$$ | . . . . . . . . 7 2 1 C X . . . . . . |
$$ | . . . . . . . . 6 C 8 3 . . . . . . . |
$$ ---------------------------------------[/go]


This is a really heavy ko. I was having a brain fart and was thinking about typical double hane endgame:

Click Here To Show Diagram Code
[go]$$Bcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O . . . O X . . . , . . . |
$$ | . . . . . . . . . . O X . X . . . . . |
$$ | . . . . . . . . 6 2 1 . X . . . . . . |
$$ | . . . . . . . . 4 3 5 . . . . . . . . |
$$ ---------------------------------------[/go]


As a result, the position does indeed normally resolve as:

Click Here To Show Diagram Code
[go]$$Bcm1
$$ | . . O X . X X X X X X X . . . . . . . |
$$ | . . O X X X O O O O O X . X . . . . . |
$$ | . . . O O O O . . . O X . . . , . . . |
$$ | . . . . . . . . . . O X . X . . . . . |
$$ | . . . . . . . 0 6 2 1 C X . . . . . . |
$$ | . . . . . . . 8 7 5 9 3 . . . . . . . |
$$ ---------------------------------------[/go]


Which is the loss of another 2 points.
Post Reply