Answers.Body: <p>This is a draw because white has enough tempo's to keep black out. For example after</p>
  <pre><code>[Variant &quot;From Position&quot;]
  [FEN &quot;8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1&quot;]
  
  1... Kd7 2. Kd4 Ke7 3. Kc5 a6 4. Kd4 Kf7
  </code></pre>
  <p>White <em>must</em> play 5. h4</p>
  <p>And if black tries to break with 5... g5 white must play 6. h5! and the king's side of the board is closed.</p>
  <p>Also after</p>
  <pre><code>[Variant &quot;From Position&quot;]
  [FEN &quot;8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1&quot;]
  
  1... g5 2. h3 gxf4 3. gxf4
  </code></pre>
  <p>white can keep the King's side closed. White could also have played 2. h4 by the way. But those are the only moves.</p>
  <p>The queen side is already closed but very importantly, white has the tempo a2-a3 here. With the pawn already on a3 this would be winning for black simply by giving away the d pawn and putting the king on d5. White then plays Kd3 but black has a pawn tempo more and will enter the position.</p>
  <p>For example,</p>
  <pre><code>[Variant &quot;From Position&quot;]
  [FEN &quot;8/p7/2k1p1pp/1p1pPp2/1P3P2/P2K2P1/7P/8 b - - 0 4&quot;]
  
  4... a6 5. Ke3 Kd7 6. Kd4 Ke7 7. h4 Kd7 8. Kd3 d4 9. Kxd4 Kc6 10. Kc3 Kd5 11. Kd3 h5 0-1
  </code></pre>
  <p>where I even started with 4... a6 because we have to walk to the Kings side to force white to close it there (play the h-pawn) and white can enforce a6 anyway by going to c5 with their king.</p>
  <p>Note that in this case playing h3, in order to get an extra &quot;tempo&quot; doesn't work for white. For example,</p>
  <pre><code>[Variant &quot;From Position&quot;]
  [FEN &quot;8/p7/2k1p1pp/1p1pPp2/1P3P2/P2K2P1/7P/8 b - - 0 4&quot;]
  
  4... Kd7 5. Kd4 Ke7 6. Kc5 a6 7. Kd4 Kf7 8. h3 g5 9. Ke3 Kg6 10. Kd4 gxf4 11. gxf4 Kh5 12. Kc5 Kh4 13. Kd6 d4 14. Kxe6 d3 15. Kf7 d2 16. e6 d1=Q 17. e7 Qd7 18. Kf8 Kxh3 19. e8=Q Qxe8+ 20. Kxe8 Kg4 21. Kf7 h5
  </code></pre>
  <p>EDIT:</p>
  <p>All credits go to EigenTime (see their answer) for the attempt of black to gain a tempo with a5! I wouldn't be surprised that this is how the endgame book thought black would win - it is only a draw because of a <em>very</em> narrow path that white has to keep it a draw that you can only find with an engine:</p>
  <pre><code>[Variant &quot;From Position&quot;]
  [FEN &quot;8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 2 21&quot;]
  
  1... Kd7 2. Kd4 Ke7 3. Kc5 a6 4. h4 Kd7 5. Kd4 Kc6 6. Kc3 Kb6 7. Kd2 a5 8. g4 fxg4 9. h5 gxh5 10. f5 g3 11. Ke1 d4 12. bxa5+ Kc7 13. f6 d3 14. f7 g2 15. Kf2 d2 16. f8=Q g1=Q+ 17. Kxg1 d1=Q+ 18. Kf2 Qd4+ 19. Kf1 Qa1+ 20. Kf2 Qxa2+ 21. Kg3 h4+ 22. Kh3 Qb3+ 23. Kxh4 Qc4+ 24. Kh5 Qe2+ 25. Kxh6 Qe3+ 26. Kg6 Qg3+ 27. Kh6 Qe3+ 28. Kg6 Qg3+ 29. Kh6 Qh2+ 30. Kg6 Qxe5 31. Qe7+ Kc6 32. a6 Qf5+ 33. Kh6 Qf4+ 34. Kg6 Qg4+ 35. Kh7 Qh5+ 36. Kg7 Qg4+ 37. Kh6 Qf4+ 38. Kh5 Qf5+ 39. Kh6 Qh3+ 40. Kg5 Qg2+ 41. Kh5 Kb6 42. a7 Qh1+ 43. Kg6 Qg2+ 44. Kf6 Qf3+ 45. Kg6 Qe4+ 46. Kh6 Qe3+ 47. Kg6 Qd3+ 48. Kg7 Qg3+ 49. Kh6 Qh2+ 50. Kg5 Qg2+ 51. Kf6 Qa8 52. Qxe6+ Kxa7 53. Qe3+ Ka6 54. Qa3+ Kb7 55. Qxa8+ Kxa8 56. Ke5 Ka7 57. Kd4 Ka6 58. Kc3 Ka5 59. Kb3
  </code></pre>
  <p>Note that almost all moves from 6 through 17 are forced for white!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T23:11:27.743Z
Answers.Text: I think the fact that moves 6-17 are of such a forced nature is the exact reason why a human player on the White side could conceivably figure this line out over the board (by process of elimination). Of course, I seriously doubt many would be able to do it, but some of the top players in the world could definitely find this defence on a good day. For the rest of us, I think the moral of the story is that this really shows how many half-points can be gained or lost in tricky pawn endgames.
Answers.UserDisplayName: Scounged
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-26T07:16:10.287Z
Answers.Text: This position is haunting me. In the last attempt, what if after 7. Kd2, Black plays 7. ... d4 (instead of 7. ... a5)? If white responds with 8. Kd3, then 8. ... a5, and the subsequent breakthrough with g4/h5 will not work (i think).
Answers.UserDisplayName: Eigentime
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T15:17:38.303Z
Answers.LastActivityDate: 2022-03-23T16:24:47.293Z
Answers.LastEditDate: 2022-03-23T16:24:47.293Z
Answers.UserDisplayName: Carlo Wood
Answers.Body: <p>I have not fully analyzed this position, but contrary to the other answers, I see a possible win for black. Here is a possible series of moves:</p>
  <pre><code>[FEN &quot;8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1&quot;]
  
  1... Kd7 2. Kd4 Ke7 3. Kc5 a6 4. Kd4 Kf7 5. h4 Ke7 6. Kc5 Kd7 7. Kd4 Kc6 8. Kd3 Kb6 9. Kd4 a5 10. a3 axb4 11. axb4 Kc7 12. Kd3 d4 13. Kxd4 Kc6 14. Kc3 Kd5 15. Kd3 h5
  </code></pre>
  <p>After black reaches f7 with the king, white is forced to play h4 because otherwise black would infiltrate the king's side. This hands the crucial tempo to black.</p>
  <p>Edit: Carlo Wood found a nice refutation of this line (for details see his answer). In summary, the position is a draw, but only through a very complicated line involving a queen and pawn endgame.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T15:52:40.447Z
Answers.Text: 12. Kd3 is the losing move. White must play 12. Kc3 (only move). Then can follow 12... Kb6 13. Kd2! (again only move) a5 14. g4!! (again only move!) fxg4 (all other moves are a dead draw) 15. h5! (or first 15. bxa5 Kc7!)  g3 16. Ke1! (you guessed it, only move!) gxh5 17. f5! (only move) d4 18. f6! (only move) d3 19. f7 (only move) g2 20. Kf2 (only move) g1Q 21. Kxg1 (only move) d2  and white has SEVERAL moves to choose from to keep it a draw, like every chess engine can easily see. Really. What were you thinking? ;)
Answers.UserDisplayName: Carlo Wood
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T15:55:27.100Z
Answers.Text: I voted this answer up - even though the conclusion isn't right, because I think this is the best attempt at winning by black and might even be the one meant by the endgame book (when they didn't have chess engines yet).
Answers.UserDisplayName: Carlo Wood
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T16:38:27.100Z
Answers.Text: Carlo, I think you mean 8. Kc3. This is a brilliant defensive resource for white.
Answers.UserDisplayName: Eigentime
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T17:00:21.777Z
Answers.Text: @Carlo Wood Hmmm, Stockfish (depth 26) on Lichess considers the final position in your sequence a win for black. Are you sure it is a draw? Which engine are you using?
Answers.UserDisplayName: Eigentime
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T17:28:04.303Z
Answers.Text: Ah you are correct. In the sequence white must take on a5 at some point. Insert the moves:  bxa5 Kc7 instead of immediately playing f6.  The result is then thus: `[Variant "From Position"]
  [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1"]
  
  1... Kd7 2. Kd4 Ke7 3. Kc5 a6 4. Kd4 Kf7 5. h4 Ke7 6. Kc5 Kd7 7. Kd4 Kc6 8. Kc3! Kb6 9. Kd2! a5 10. g4!! fxg4 11. h5! g3 12. Ke1! gxh5 13. f5! d4 14. bxa5+! Kc7 15. f6! d3 16. f7! g2 17. Kf2! g1=Q+ 18. Kxg1! d2`  where an exclamation mark means "only move" - except that bxa5 can be played also on move 15.
Answers.UserDisplayName: Carlo Wood
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-26T10:50:35.527Z
Answers.Text: @CarloWood any comment on Eigentime's latest refutation on your line? It's basically d4 instead of a5.
Answers.UserDisplayName: justhalf
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-26T13:26:26.393Z
Answers.Text: @justhalf I think it is a bit random and not interesting anymore :p. People should just use an engine themselves to see how this is a draw. In this case I'd say black has to fight for a draw even. After 10... a5 would follow: 11. bxa5 and now white wins unless black plays 11... Kxa5 Then follows for example: 12. Kxd4 Kb6 (again only move to keep it a draw) And now almost every move by white is a draw. Dead draw.
Answers.UserDisplayName: Carlo Wood
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-28T05:49:52.040Z
Answers.Text: @Eigentime ah, so you hadn't read Carlo's answer when you wrote that. That makes sense then. Thanks for updating your answer!
Answers.UserDisplayName: justhalf
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-30T11:54:12.807Z
Answers.Text: @justhalf indeed, Carlo is quite right in pointing out that using a decent engine 'solves' this problem. I updated my answer accordingly.
Answers.UserDisplayName: Eigentime
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T14:44:27.153Z
Answers.LastActivityDate: 2022-03-28T05:40:49.213Z
Answers.LastEditDate: 2022-03-28T05:40:49.213Z
Answers.UserDisplayName: Eigentime
Answers.Body: <p>How can you be certain that your notes are correct? This position is a bit complicated to work out at a glance, but as I see it there is only one possible winning plan for black here, consisting of the following:</p>
  <blockquote>
  <p>play a well-timed ...d4, and after White plays Kxd4 Black will play ...Kc6 and force White's king back.</p>
  </blockquote>
  <p>However, White has pawns that they can use to manipulate tempi, and in order to actually break through in the center with the plan I outlined above Black actually needs to force zugzwang TWICE! This is because even if White has to move their king from d4 after ...Kc6, White can still move their king to e3 and counter Black's ...Kd5 with Kd3.</p>
  <p>And so, the question becomes rather simple: can Black engineer this position so that they have TWO more spare tempi than White instead of one? We note immediately that at most one spare tempo can come from the queenside pawns with ...a7-a6 (if White is careless and plays, say, a2-a3 prematurely), meaning that Black needs at least one spare tempo from the kingside as well.</p>
  <p>If White is to move, then White will just pass the move over to Black with 1.Kc3, Ke3 or Kd4. This does not really affect the evaluation of the underlying position, since the only real winning plan is still a successful ...d4 push. Thus, we may consider ways for black to force the issue.</p>
  <p>Black has, in total, four pawn moves and a bunch of king moves. The king moves clearly don't lead to any substantial progress, so let us consider the available pawn moves.</p>
  <p>1...a6 and 1...h5 are immediately off the table, since they waste Black's precious opportunity to create an extra tempo, and thus we may consider the other pawn moves as the only possibly winning moves.</p>
  <p>If Black plays 1...g5, then White can respond with 2.h4 with the threat of playing 3.h5! This would force Black into going for the draw, since otherwise White could easily create a passed pawn. Thus, we get that after 1...g5 2.h4 Black needs to play either 3...g4 or 3...gxf4. Out of these, 3...gxf4 is the only move that can actually work. But even this move fails, since after 3...gxf4 4.gxf4 we see that Black has only managed to create ONE spare tempo; after 4...d4 5.Kxd4 h5 6.a3! a6 7.Ke3, the position is indeed drawn. From this, I make the conclusion that the position is drawn after 1...g5.</p>
  <p>Left to consider is 1...a5!? This move looks quite odd at first glance, but it's actually not completely harmless. If White plays 2.bxa5?, then black responds with 2...b4 followed by ...Kb5 and ...Kxa5. This would indeed be winning, so White needs to play 2.a3 here (2.Kc3 axb4+ 3.Kxb4 d4! wins for black). Thus, we may conclude that the line has to go 1...a5 2.a3, and here we run into some issues as Black. Now the pawn on b5 can never be protected by a pawn on a6, so Black has to be careful about allowing Kc5. Moreover, as long as Black's pawn on a5 remains undefended Black cannot play the ...d4 push and get the desired zugzwang with ...Kc6, since this would let White just take on a5 and win. Thus, we can conclude that Black NEEDS to play either ...axb4 or ...a4 before the ...d4 push. But this means that Black has zero spare tempi on the queenside. Because of this, I conclude that the position is drawn after 1...a5.</p>
  <p>To summarize: your notes are definitely wrong, and the position is a draw no matter who makes the first move.</p>
  <p><strong>Edit:</strong> As indicated by other answers, there is one serious attempt involving a king march to provoke h4, followed by engineering an ...a5 push to gain the extra tempo needed in order to make the ...d4 break work. I did not consider this option when I posted my answer, and although my conclusions are still correct (the position is still a draw after some precise moves from White, see Carlo Wood's answer to get an idea of the lines that need to be considered), this answer is definitely incomplete. I guess it just goes to show how tricky pawn endgames really can be. Take care, and remember: don't make any hasty assumptions about pawn endgames!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T01:52:00.747Z
Answers.Text: Thank you for your thoughtful reply.  I am about 80% sure that my notes are correct (reason for that conclusion is too long for a comment.)  I will play around with the position taking your comments in mind.
Answers.UserDisplayName: Garnet
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T09:39:16.730Z
Answers.Text: Is there no way for black to play a6 and then push kingside with the black king? White king can't leave c5 (to b6 or d6 to attack) since black can then push d4 and win. In this sense, white king is blocked, but black king is free
Answers.UserDisplayName: justhalf
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T09:47:07.200Z
Answers.Text: Ah, white can play h4 to block any black advances kingside. So if black pawn was at g7 instead, it's a win for black. But not here.
Answers.UserDisplayName: justhalf
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T10:15:18.017Z
Answers.Text: "Black will play ...Kc6" - Isn't Black's king *already on* square c6?
Answers.UserDisplayName: AJM
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T13:56:18.240Z
Answers.Text: The context before that is "well-timed ..d4". It means black needs to do some setup before playing d4, to enable black king to move to c6 immediately after white takes Kxd4
Answers.UserDisplayName: justhalf
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T14:18:27.430Z
Answers.Text: What if the king moved to f7 before the pawn push of g5? This would make white's h4 impossible because it would be answered with Kg6, which should be a winning position for black. So, to prevent this, white would play h4 before black's g5, handing black a tempo with the h pawn.
Answers.UserDisplayName: Eigentime
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T20:01:51.897Z
Answers.Text: @Garnet It's also possible that your notes are correct, and the book is wrong.
Answers.UserDisplayName: 22degrees
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T20:28:41.483Z
Answers.Text: @22degrees That is possible.  I wish I could remember what book I got those positions from.
Answers.UserDisplayName: Garnet
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T22:46:56.137Z
Answers.Text: @Eigentime If Black's king goes to f7 before pushing ...g5, White needs to play Kc5 at some point to force ...a6, and precisely when Black plays ...Kf7, White has to reply with h4! While other defensive tries do not work for White, this one seems to do the trick, since Black loses the extra tempo on the queenside and only has one spare tempo on the kingside left.
Answers.UserDisplayName: Scounged
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-22T22:51:09.207Z
Answers.LastActivityDate: 2022-03-23T23:03:59.483Z
Answers.LastEditDate: 2022-03-23T23:03:59.483Z
Answers.UserDisplayName: Scounged
Answers.Body: <p>Black has D5-D4 to create an opening for entry onto white's position. Needs analysis to determine if black can then force the opposition and win.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-22T22:07:37.107Z
Answers.LastActivityDate: 2022-03-22T22:07:37.107Z
Answers.UserDisplayName: CWallach
Answers.Body: <blockquote>
  <p>According to my notes, Black wins this position regardless of whose move it is.</p>
  </blockquote>
  <p>Your notes are wrong. Black has no entry squares and never will have. For the most part white moves the king between d3 and d4 unless white makes a pawn break with a4 in which case white just protects the b pawn with a3. In general on both sides of the board white declines to capture pawns when offered but does recapture.</p>
  <p>Meanwhile black's king can never move away from protecting the c5 square since if white is allowed to play Kc5 then it is black who is in danger of losing.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-22T21:49:59.277Z
Answers.LastActivityDate: 2022-03-22T21:49:59.277Z
Answers.UserDisplayName: Brian Towers
Answers.Body: <p>I beat stockfish with Eigentime method. It was still tricky - I messed it the first time by going for b4 and stockfish was able to push quicker on the queen side. Nice lesson for me. Here's the full winning sequence:</p>
  <pre><code>[Event &quot;Casual Standard game&quot;]
  [Date &quot;2022.03.24&quot;]
  [White &quot;lichess AI level 8&quot;]
  [Result &quot;0-1&quot;]
  [UTCDate &quot;2022.03.24&quot;]
  [UTCTime &quot;11:21:50&quot;]
  [WhiteElo &quot;?&quot;]
  [BlackElo &quot;1500&quot;]
  [Variant &quot;From Position&quot;]
  [TimeControl &quot;-&quot;]
  [ECO &quot;?&quot;]
  [Opening &quot;?&quot;]
  [Termination &quot;Normal&quot;]
  [FEN &quot;8/p1k5/4p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 w - - 0 1&quot;]
  [SetUp &quot;1&quot;]
  [Annotator &quot;lichess.org&quot;]
  
  1. Kc3 Kd7 2. Kd4 Ke7 3. Kc5 a6 4. h4 Kd7 5. Kd4 Kc6 6. Kc3 Kb6 7. Kd4 a5 8. a3 axb4 9. axb4 Kc7 10. Kc5 d4 11. Kxd4 Kc6 12. Kd3 Kd5 13. Ke2 Ke4 14. Kf2 Kd3 15. g4 Ke4 16. h5 gxh5 17. gxf5 Kxf5 18. Ke3 h4 19. Kf3 h5 20. Ke3 h3 21. Kf3 h4 22. Kf2 Kxf4 23. Kg1 Kxe5 24. Kh2 Kd4 25. Kxh3 Kd3 26. Kxh4 e5 27. Kg3 e4 28. Kf4 e3 29. Ke5 e2 30. Kf4 e1=Q 31. Kf5 Qe4+ 32. Kf6 Kd4 33. Kf7 Qe5 34. Kg6 Kd5 35. Kf7 Qe6+ 36. Kg7 Ke5 37. Kf8 Qd7 38. Kg8 Kf6 39. Kh8 Qg7# { Black wins by checkmate. } 0-1
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-24T15:33:53.120Z
Answers.Text: Yeah, lichess level 8 is playing still pretty "weak" - my brother, who isn't even a club player - sometimes wins from it.  7. Kd4 is the losing move in this case - my locally running stockfish sees that near instantly - its probably that the engine at level 8 simply deliberately doesn't play the best move a certain percentage of the time - which is fatal when there is only a single move that keeps it a draw (7. Kd2).
Answers.UserDisplayName: Carlo Wood
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-24T11:35:10.210Z
Answers.LastActivityDate: 2022-03-24T12:01:33.043Z
Answers.LastEditDate: 2022-03-24T12:01:33.043Z
Answers.UserDisplayName: Roshko
Body: <p>I recently ran across notes I made from a book on endgames (I don't remember the book).  According to my notes, Black wins this position regardless of whose move it is.  I don't see it, and <a href="https://en.wikipedia.org/wiki/Stockfish_%28chess%29" rel="nofollow noreferrer">Stockfish</a> doesn't see it.  What am I missing?</p>
  <pre><code>[FEN &quot;8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 w - - 0 1&quot;]
  </code></pre>
  <hr/>
  <p><sub>Thanks to everyone for the thoughtful answers.  I haven't had time to go through all of them yet.  However, I had Stockfish analyze every move (both black &amp; white) for at least 30 moves.  And, it found a winning line.  I will now go through the comments to see how and why Stockfish differed from the answers given.  Note, White's two pawn pushes (a3 &amp; h3) didn't show up until Stockfish was at least 56 ply deep.</sub></p>
  <pre><code>[FEN &quot;8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1&quot;]
  
  1... Kb6 2. Kc3 a6 3. a3 Kc7 4. h3 Kd7 5. Kd4 Ke7 6. Ke3 Kf7 7. 
  h4 Ke8 8. Kd3 Kd8 9. Kc3 Kc7 10. Kd2 Kd7 11. Ke3 d4+ 12. Kxd4 Kc6 
  13. h5 gxh5 14. Kc3 Kd5 15. Kd3 h4 16. gxh4 h5 17. Ke3 Kc4 *
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-23T22:44:49.163Z
Comments.Text: In the winning line you give, I don't quite understand why White is forced to play 3.a3, which to me seems like an outright blunder (since it wastes a tempo unneccessarily). If White just sits on the position I see no way for Black to break through, even with computer help.
Comments.UserDisplayName: Scounged
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-23T22:57:52.330Z
Comments.Text: @scounged I agree.  I also don't understand the h3 push for the same reason.  That is why I am currently having stockfish analyze the position if White doesn't make the pawn push.  Unfortunately, having it analyze 30 moves deep takes a long time.  Remember, stockfish didn't come up with the either pawn push until it was at least 56 ply deep.  Before then, it was showing a king move.
Comments.UserDisplayName: Garnet
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-24T02:09:06.297Z
Comments.Text: In your move 7, after the black king moves to e7, why doesn't the white king move to c5? I don't see an obvious refutation...
Comments.UserDisplayName: paul garrett
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-25T05:27:22.173Z
Comments.Text: Then probably it was trying to avoid three fold repetition in the future. Computer analysis usually tries to do something, even when doing nothing is the best move to *draw*. It doesn't like being stuck
Comments.UserDisplayName: justhalf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-25T05:30:28.900Z
Comments.Text: @paulgarrett while it's not harmful (absence of any winning move by black that we have yet to see), moving to c5 doesn't really gain anything either. It can't go to 6-th rank (or black d pawn will queen). So the only other possible move after c5 is to move back to d4.
Comments.UserDisplayName: justhalf
Tags: <endgame><puzzles>
Title: How does Black win this position?
ThreadText: # How does Black win this position?
  
  (Asked by: username_0 on 2022-03-22)
  
  I recently ran across notes I made from a book on endgames (I don't remember the book).  According to my notes, Black wins this position regardless of whose move it is.  I don't see it, and Stockfish doesn't see it.  What am I missing?
  [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 w - - 0 1"]
  
  
  Thanks to everyone for the thoughtful answers.  I haven't had time to go through all of them yet.  However, I had Stockfish analyze every move (both black & white) for at least 30 moves.  And, it found a winning line.  I will now go through the comments to see how and why Stockfish differed from the answers given.  Note, White's two pawn pushes (a3 & h3) didn't show up until Stockfish was at least 56 ply deep.
  [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1"]
  
  1... Kb6 2. Kc3 a6 3. a3 Kc7 4. h3 Kd7 5. Kd4 Ke7 6. Ke3 Kf7 7. 
  h4 Ke8 8. Kd3 Kd8 9. Kc3 Kc7 10. Kd2 Kd7 11. Ke3 d4+ 12. Kxd4 Kc6 
  13. h5 gxh5 14. Kc3 Kd5 15. Kd3 h4 16. gxh4 h5 17. Ke3 Kc4 *
  
  **Tags:** endgame, puzzles
  
  > **Comments:**
  > **username_1**: In the winning line you give, I don't quite understand why White is forced to play 3.a3, which to me seems like an outright blunder (since it wastes a tempo unneccessarily). If White just sits on the position I see no way for Black to break through, even with computer help.  
  > **username_0**: @scounged I agree.  I also don't understand the h3 push for the same reason.  That is why I am currently having stockfish analyze the position if White doesn't make the pawn push.  Unfortunately, having it analyze 30 moves deep takes a long time.  Remember, stockfish didn't come up with the either pawn push until it was at least 56 ply deep.  Before then, it was showing a king move.  
  > **username_2**: In your move 7, after the black king moves to e7, why doesn't the white king move to c5? I don't see an obvious refutation...  
  > **username_3**: Then probably it was trying to avoid three fold repetition in the future. Computer analysis usually tries to do something, even when doing nothing is the best move to *draw*. It doesn't like being stuck  
  > **username_3**: @paulgarrett while it's not harmful (absence of any winning move by black that we have yet to see), moving to c5 doesn't really gain anything either. It can't go to 6-th rank (or black d pawn will queen). So the only other possible move after c5 is to move back to d4.  
  
  ---
  
  ## 6 answers
  
  ### Answer by username_1 on 2022-03-22. Score: 10
  
  How can you be certain that your notes are correct? This position is a bit complicated to work out at a glance, but as I see it there is only one possible winning plan for black here, consisting of the following:
  
  > play a well-timed ...d4, and after White plays Kxd4 Black will play ...Kc6 and force White's king back.
  
  However, White has pawns that they can use to manipulate tempi, and in order to actually break through in the center with the plan I outlined above Black actually needs to force zugzwang TWICE! This is because even if White has to move their king from d4 after ...Kc6, White can still move their king to e3 and counter Black's ...Kd5 with Kd3.
  
  And so, the question becomes rather simple: can Black engineer this position so that they have TWO more spare tempi than White instead of one? We note immediately that at most one spare tempo can come from the queenside pawns with ...a7-a6 (if White is careless and plays, say, a2-a3 prematurely), meaning that Black needs at least one spare tempo from the kingside as well.
  
  If White is to move, then White will just pass the move over to Black with 1.Kc3, Ke3 or Kd4. This does not really affect the evaluation of the underlying position, since the only real winning plan is still a successful ...d4 push. Thus, we may consider ways for black to force the issue.
  
  Black has, in total, four pawn moves and a bunch of king moves. The king moves clearly don't lead to any substantial progress, so let us consider the available pawn moves.
  
  1...a6 and 1...h5 are immediately off the table, since they waste Black's precious opportunity to create an extra tempo, and thus we may consider the other pawn moves as the only possibly winning moves.
  
  If Black plays 1...g5, then White can respond with 2.h4 with the threat of playing 3.h5! This would force Black into going for the draw, since otherwise White could easily create a passed pawn. Thus, we get that after 1...g5 2.h4 Black needs to play either 3...g4 or 3...gxf4. Out of these, 3...gxf4 is the only move that can actually work. But even this move fails, since after 3...gxf4 4.gxf4 we see that Black has only managed to create ONE spare tempo; after 4...d4 5.Kxd4 h5 6.a3! a6 7.Ke3, the position is indeed drawn. From this, I make the conclusion that the position is drawn after 1...g5.
  
  Left to consider is 1...a5!? This move looks quite odd at first glance, but it's actually not completely harmless. If White plays 2.bxa5?, then black responds with 2...b4 followed by ...Kb5 and ...Kxa5. This would indeed be winning, so White needs to play 2.a3 here (2.Kc3 axb4+ 3.Kxb4 d4! wins for black). Thus, we may conclude that the line has to go 1...a5 2.a3, and here we run into some issues as Black. Now the pawn on b5 can never be protected by a pawn on a6, so Black has to be careful about allowing Kc5. Moreover, as long as Black's pawn on a5 remains undefended Black cannot play the ...d4 push and get the desired zugzwang with ...Kc6, since this would let White just take on a5 and win. Thus, we can conclude that Black NEEDS to play either ...axb4 or ...a4 before the ...d4 push. But this means that Black has zero spare tempi on the queenside. Because of this, I conclude that the position is drawn after 1...a5.
  
  To summarize: your notes are definitely wrong, and the position is a draw no matter who makes the first move.
  
  **Edit:** As indicated by other answers, there is one serious attempt involving a king march to provoke h4, followed by engineering an ...a5 push to gain the extra tempo needed in order to make the ...d4 break work. I did not consider this option when I posted my answer, and although my conclusions are still correct (the position is still a draw after some precise moves from White, see username_4's answer to get an idea of the lines that need to be considered), this answer is definitely incomplete. I guess it just goes to show how tricky pawn endgames really can be. Take care, and remember: don't make any hasty assumptions about pawn endgames!
  
  > **Comments:**
  > **username_0**: Thank you for your thoughtful reply.  I am about 80% sure that my notes are correct (reason for that conclusion is too long for a comment.)  I will play around with the position taking your comments in mind.  
  > **username_3**: Is there no way for black to play a6 and then push kingside with the black king? White king can't leave c5 (to b6 or d6 to attack) since black can then push d4 and win. In this sense, white king is blocked, but black king is free  
  > **username_3**: Ah, white can play h4 to block any black advances kingside. So if black pawn was at g7 instead, it's a win for black. But not here.  
  > **username_6**: "Black will play ...Kc6" - Isn't Black's king *already on* square c6?  
  > **username_3**: The context before that is "well-timed ..d4". It means black needs to do some setup before playing d4, to enable black king to move to c6 immediately after white takes Kxd4  
  > **username_5**: What if the king moved to f7 before the pawn push of g5? This would make white's h4 impossible because it would be answered with Kg6, which should be a winning position for black. So, to prevent this, white would play h4 before black's g5, handing black a tempo with the h pawn.  
  > **username_7**: @username_0 It's also possible that your notes are correct, and the book is wrong.  
  > **username_0**: @username_7 That is possible.  I wish I could remember what book I got those positions from.  
  > **username_1**: @username_5 If Black's king goes to f7 before pushing ...g5, White needs to play Kc5 at some point to force ...a6, and precisely when Black plays ...Kf7, White has to reply with h4! While other defensive tries do not work for White, this one seems to do the trick, since Black loses the extra tempo on the queenside and only has one spare tempo on the kingside left.  
  
  ---
  
  ### Answer by username_4 on 2022-03-23. Score: 9
  
  This is a draw because white has enough tempo's to keep black out. For example after
  [Variant "From Position"]
  [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1"]
  
  1... Kd7 2. Kd4 Ke7 3. Kc5 a6 4. Kd4 Kf7
  
  White must play 5. h4
  And if black tries to break with 5... g5 white must play 6. h5! and the king's side of the board is closed.
  Also after
  [Variant "From Position"]
  [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1"]
  
  1... g5 2. h3 gxf4 3. gxf4
  
  white can keep the King's side closed. White could also have played 2. h4 by the way. But those are the only moves.
  The queen side is already closed but very importantly, white has the tempo a2-a3 here. With the pawn already on a3 this would be winning for black simply by giving away the d pawn and putting the king on d5. White then plays Kd3 but black has a pawn tempo more and will enter the position.
  For example,
  [Variant "From Position"]
  [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/P2K2P1/7P/8 b - - 0 4"]
  
  4... a6 5. Ke3 Kd7 6. Kd4 Ke7 7. h4 Kd7 8. Kd3 d4 9. Kxd4 Kc6 10. Kc3 Kd5 11. Kd3 h5 0-1
  
  where I even started with 4... a6 because we have to walk to the Kings side to force white to close it there (play the h-pawn) and white can enforce a6 anyway by going to c5 with their king.
  Note that in this case playing h3, in order to get an extra "tempo" doesn't work for white. For example,
  [Variant "From Position"]
  [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/P2K2P1/7P/8 b - - 0 4"]
  
  4... Kd7 5. Kd4 Ke7 6. Kc5 a6 7. Kd4 Kf7 8. h3 g5 9. Ke3 Kg6 10. Kd4 gxf4 11. gxf4 Kh5 12. Kc5 Kh4 13. Kd6 d4 14. Kxe6 d3 15. Kf7 d2 16. e6 d1=Q 17. e7 Qd7 18. Kf8 Kxh3 19. e8=Q Qxe8+ 20. Kxe8 Kg4 21. Kf7 h5
  
  EDIT:
  All credits go to EigenTime (see their answer) for the attempt of black to gain a tempo with a5! I wouldn't be surprised that this is how the endgame book thought black would win - it is only a draw because of a very narrow path that white has to keep it a draw that you can only find with an engine:
  [Variant "From Position"]
  [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 2 21"]
  
  1... Kd7 2. Kd4 Ke7 3. Kc5 a6 4. h4 Kd7 5. Kd4 Kc6 6. Kc3 Kb6 7. Kd2 a5 8. g4 fxg4 9. h5 gxh5 10. f5 g3 11. Ke1 d4 12. bxa5+ Kc7 13. f6 d3 14. f7 g2 15. Kf2 d2 16. f8=Q g1=Q+ 17. Kxg1 d1=Q+ 18. Kf2 Qd4+ 19. Kf1 Qa1+ 20. Kf2 Qxa2+ 21. Kg3 h4+ 22. Kh3 Qb3+ 23. Kxh4 Qc4+ 24. Kh5 Qe2+ 25. Kxh6 Qe3+ 26. Kg6 Qg3+ 27. Kh6 Qe3+ 28. Kg6 Qg3+ 29. Kh6 Qh2+ 30. Kg6 Qxe5 31. Qe7+ Kc6 32. a6 Qf5+ 33. Kh6 Qf4+ 34. Kg6 Qg4+ 35. Kh7 Qh5+ 36. Kg7 Qg4+ 37. Kh6 Qf4+ 38. Kh5 Qf5+ 39. Kh6 Qh3+ 40. Kg5 Qg2+ 41. Kh5 Kb6 42. a7 Qh1+ 43. Kg6 Qg2+ 44. Kf6 Qf3+ 45. Kg6 Qe4+ 46. Kh6 Qe3+ 47. Kg6 Qd3+ 48. Kg7 Qg3+ 49. Kh6 Qh2+ 50. Kg5 Qg2+ 51. Kf6 Qa8 52. Qxe6+ Kxa7 53. Qe3+ Ka6 54. Qa3+ Kb7 55. Qxa8+ Kxa8 56. Ke5 Ka7 57. Kd4 Ka6 58. Kc3 Ka5 59. Kb3
  
  Note that almost all moves from 6 through 17 are forced for white!
  
  > **Comments:**
  > **username_1**: I think the fact that moves 6-17 are of such a forced nature is the exact reason why a human player on the White side could conceivably figure this line out over the board (by process of elimination). Of course, I seriously doubt many would be able to do it, but some of the top players in the world could definitely find this defence on a good day. For the rest of us, I think the moral of the story is that this really shows how many half-points can be gained or lost in tricky pawn endgames.  
  > **username_5**: This position is haunting me. In the last attempt, what if after 7. Kd2, Black plays 7. ... d4 (instead of 7. ... a5)? If white responds with 8. Kd3, then 8. ... a5, and the subsequent breakthrough with g4/h5 will not work (i think).  
  
  ---
  
  ### Answer by username_5 on 2022-03-23. Score: 8
  
  I have not fully analyzed this position, but contrary to the other answers, I see a possible win for black. Here is a possible series of moves:
  [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1"]
  
  1... Kd7 2. Kd4 Ke7 3. Kc5 a6 4. Kd4 Kf7 5. h4 Ke7 6. Kc5 Kd7 7. Kd4 Kc6 8. Kd3 Kb6 9. Kd4 a5 10. a3 axb4 11. axb4 Kc7 12. Kd3 d4 13. Kxd4 Kc6 14. Kc3 Kd5 15. Kd3 h5
  
  After black reaches f7 with the king, white is forced to play h4 because otherwise black would infiltrate the king's side. This hands the crucial tempo to black.
  Edit: username_4 found a nice refutation of this line (for details see his answer). In summary, the position is a draw, but only through a very complicated line involving a queen and pawn endgame.
  
  > **Comments:**
  > **username_4**: 12. Kd3 is the losing move. White must play 12. Kc3 (only move). Then can follow 12... Kb6 13. Kd2! (again only move) a5 14. g4!! (again only move!) fxg4 (all other moves are a dead draw) 15. h5! (or first 15. bxa5 Kc7!)  g3 16. Ke1! (you guessed it, only move!) gxh5 17. f5! (only move) d4 18. f6! (only move) d3 19. f7 (only move) g2 20. Kf2 (only move) g1Q 21. Kxg1 (only move) d2  and white has SEVERAL moves to choose from to keep it a draw, like every chess engine can easily see. Really. What were you thinking? ;)  
  > **username_4**: I voted this answer up - even though the conclusion isn't right, because I think this is the best attempt at winning by black and might even be the one meant by the endgame book (when they didn't have chess engines yet).  
  > **username_5**: Carlo, I think you mean 8. Kc3. This is a brilliant defensive resource for white.  
  > **username_5**: @username_4 Hmmm, Stockfish (depth 26) on Lichess considers the final position in your sequence a win for black. Are you sure it is a draw? Which engine are you using?  
  > **username_4**: Ah you are correct. In the sequence white must take on a5 at some point. Insert the moves:  bxa5 Kc7 instead of immediately playing f6.  The result is then thus: `[Variant "From Position"] [FEN "8/p7/2k1p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 b - - 0 1"]  1... Kd7 2. Kd4 Ke7 3. Kc5 a6 4. Kd4 Kf7 5. h4 Ke7 6. Kc5 Kd7 7. Kd4 Kc6 8. Kc3! Kb6 9. Kd2! a5 10. g4!! fxg4 11. h5! g3 12. Ke1! gxh5 13. f5! d4 14. bxa5+! Kc7 15. f6! d3 16. f7! g2 17. Kf2! g1=Q+ 18. Kxg1! d2`  where an exclamation mark means "only move" - except that bxa5 can be played also on move 15.  
  > **username_3**: @CarloWood any comment on username_5's latest refutation on your line? It's basically d4 instead of a5.  
  > **username_4**: @username_3 I think it is a bit random and not interesting anymore :p. People should just use an engine themselves to see how this is a draw. In this case I'd say black has to fight for a draw even. After 10... a5 would follow: 11. bxa5 and now white wins unless black plays 11... Kxa5 Then follows for example: 12. Kxd4 Kb6 (again only move to keep it a draw) And now almost every move by white is a draw. Dead draw.  
  > **username_3**: @username_5 ah, so you hadn't read Carlo's answer when you wrote that. That makes sense then. Thanks for updating your answer!  
  > **username_5**: @username_3 indeed, Carlo is quite right in pointing out that using a decent engine 'solves' this problem. I updated my answer accordingly.  
  
  ---
  
  ### Answer by username_8 on 2022-03-22. Score: 3
  
  Black has D5-D4 to create an opening for entry onto white's position. Needs analysis to determine if black can then force the opposition and win.
  
  
  ---
  
  ### Answer by username_9 on 2022-03-22. Score: 3
  
  > According to my notes, Black wins this position regardless of whose move it is.
  
  Your notes are wrong. Black has no entry squares and never will have. For the most part white moves the king between d3 and d4 unless white makes a pawn break with a4 in which case white just protects the b pawn with a3. In general on both sides of the board white declines to capture pawns when offered but does recapture.
  
  Meanwhile black's king can never move away from protecting the c5 square since if white is allowed to play Kc5 then it is black who is in danger of losing.
  
  
  ---
  
  ### Answer by username_10 on 2022-03-24. Score: 0
  
  I beat stockfish with username_5 method. It was still tricky - I messed it the first time by going for b4 and stockfish was able to push quicker on the queen side. Nice lesson for me. Here's the full winning sequence:
  [Event "Casual Standard game"]
  [Date "2022.03.24"]
  [White "lichess AI level 8"]
  [Result "0-1"]
  [UTCDate "2022.03.24"]
  [UTCTime "11:21:50"]
  [WhiteElo "?"]
  [BlackElo "1500"]
  [Variant "From Position"]
  [TimeControl "-"]
  [ECO "?"]
  [Opening "?"]
  [Termination "Normal"]
  [FEN "8/p1k5/4p1pp/1p1pPp2/1P3P2/3K2P1/P6P/8 w - - 0 1"]
  [SetUp "1"]
  [Annotator "lichess.org"]
  
  1. Kc3 Kd7 2. Kd4 Ke7 3. Kc5 a6 4. h4 Kd7 5. Kd4 Kc6 6. Kc3 Kb6 7. Kd4 a5 8. a3 axb4 9. axb4 Kc7 10. Kc5 d4 11. Kxd4 Kc6 12. Kd3 Kd5 13. Ke2 Ke4 14. Kf2 Kd3 15. g4 Ke4 16. h5 gxh5 17. gxf5 Kxf5 18. Ke3 h4 19. Kf3 h5 20. Ke3 h3 21. Kf3 h4 22. Kf2 Kxf4 23. Kg1 Kxe5 24. Kh2 Kd4 25. Kxh3 Kd3 26. Kxh4 e5 27. Kg3 e4 28. Kf4 e3 29. Ke5 e2 30. Kf4 e1=Q 31. Kf5 Qe4+ 32. Kf6 Kd4 33. Kf7 Qe5 34. Kg6 Kd5 35. Kf7 Qe6+ 36. Kg7 Ke5 37. Kf8 Qd7 38. Kg8 Kf6 39. Kh8 Qg7# { Black wins by checkmate. } 0-1
  
  > **Comments:**
  > **username_4**: Yeah, lichess level 8 is playing still pretty "weak" - my brother, who isn't even a club player - sometimes wins from it.  7. Kd4 is the losing move in this case - my locally running stockfish sees that near instantly - its probably that the engine at level 8 simply deliberately doesn't play the best move a certain percentage of the time - which is fatal when there is only a single move that keeps it a draw (7. Kd2).  
  
  ---
  
  