# Endgame puzzle: How to avoid stalemate and win?

I'm stuck on this problem a friend shared with me recently, with barely any pieces left and apparently white is able to force a win but I've been hitting a wall with everything I've tried so far, as everything seems to immediately lead to stalemate...! Here's the diagram of the problem, with white to move and win:

`````` [title "White to move and win"]
[fen "6k1/6P1/5BP1/p7/8/K7/p7/8 w - - 0 1"]
``````

I know that if I entered this position into an engine I'd probably get the answer immediately, but to be honest as opposed to just seeing the answer, I'm more interested in how one should approach or reason about such problems in order to systematically get closer to finding the solution. So I would appreciate it if someone could flesh out how they approached the problem and step by step got to the solution, that would be incredibly helpful.

It's quite a fun problem to think about, before getting to the calculation of long variations, try to first spot the key idea needed to crack the problem.

Here are the first observations that come to my mind which eventually led me to spot the solution, let's break them down step by step:

• a) With our bishop eyeing `g7` and our doubled pawn formation on `g6-g7`, black will draw by stalemate as soon as they run out of pawn moves on the `a` file.
• b) With a) in mind, try some basic moves to develop a feel for the position and nuances in terms of timing. So let's attempt to see through some of our king move options: `1.Ka4` is no good as it will end immediately in a draw after `2...a1=Q+ 3.Bxa1`, similarly with `1.Kb2 a1=Q+ 2.Kxa1 a4` and the draw is trivial.
• c) Count black's remaining moves: in principle there are a total of 5 pawn moves, then it's a stalemate unless we give the black king on `g8` a legal move.
• d) To ensure the latter, the only way is clearly to let the `g7` pawn fall, as `g6` cannot move anyway.
• e) But how to give away the `g7` pawn, while i) our bishop still eyes the promotion square (`a1`), and ii) afterwards not leave hanging our 2nd and only remaining pawn on `g6` which is a light square pawn!
• f) observations in e) basically tell us that we cannot leave the `a1-h8` diagonal with our bishop or else black promotes. So in order to leave `g7` unprotected, our only option is to blind the bishop by blocking the long diagonal with the king!
• g) Assuming we leave our bishop on `a1`, then there are various options for blinding the bishop, for instance getting the king to `c3` or `d4` or `e5`, ... which is the right one?
• h) We can resolve that by remembering our observation e, ii), namely that after black takes on `g7` we need to be in time to protect `g6,` that means in the very next ply! Therefore, our only option is to block the bishop's sight via `e5`, let black take, and defend `g6` immediately with `Kf5,` right on time. In fact `Kf5` will unavoidably be with check as our bishop is still on the long diagonal! Once `g7` is removed and `g6` is defended, black has spare king moves and there are no threats of stalemate anymore.

Summary of our discovered idea:

Now it simply remains to execute our plan correctly, which means a bit of concrete assessment of the position in order to find the right move order:

• We know we want our bishop somewhere between `a1-d4`, so let's try the immediate `1.Ba1`: `2...a4` and black draws immediately. All other bishop moves lead to the same situation after `2...a1=Q` forcing `Bxa1.`

• Let's not waste tempi at start with the bishop since it'll be naturally drawn to `a1` anyhow as we let black promote. Instead, let's use all our tempi to get our king to `d5` as fast as possible and prepare our `Ke5-Kf5` maneuver.

Solution:

So let's try: `1. Kb3 a4+ 2. Kc4 a3 3. Kd5 a1=Q 4. Bxa1 a2 5. Ke5 Kxg7 6. Kf5+ kg8` the difficult bit is done! Now we just have to shoulder away the king from the promotion square (`g8`). `7. Ke6 Kf8 8. g7+ Kg8 9. Ke7 Kh7 10. Kf7` and the rest is trivial.

I really recommend to either go through the above discussions without using an analysis board to try out moves, or to try and solve it on your own with mental calculations only, considering our observations a to h. As there are only few pieces in this problem, it can make for a very useful exercise of concentration and calculation.

Animated solution:

Right now Black can only move his/her pawns. There are 1+4 moves left. To win, White needs the black king to capture the g7 pawn but not the g6 pawn. Therefore, the King must protect it (probably from f5). Let's try to get the king there:

1. Kb3 a4+ 2. Kc4 a3 3. Kd5 a1Q 4. Bxa1 a2 5. Ke5 (conveniently blocking the long diagonal) Kxg7 6. Kf5+

Now 6... Kg8 is the hardiest defense, since Kf8 would give away the opposition in a basic king + pawn vs. king endgame. Can White win after 6... Kg8?

Yes, (s)he can with 7. Ke6, since the normal defense in a king + pawn vs. king endgame, 7... Kg7 is not possible thanks to the bishop.

I hope you can take it from here, it's not too difficult anymore.

• Thanks to both for the prompt answers, very instructive! – user929304 May 3 at 14:17

I approached this problem in reverse. I transported my king to a winning position at F5 and then tried to figure out how he got there. I also realized that my pawn at G7 had to be removed with Black's help, but my own bishop was preventing that. Eventually, I saw that my King could block my bishop and for the sacrifice of G7. All of this has to be done while still giving Black a legal pawn move to avoid stalemate.

• Why is f5 a winning square for your king? – hkBst May 5 at 14:45
• White's king has to defend the g6 pawn and escort it to promotion. The sac of g7 is necessary to avoid a stalemate, but after the sac white must not lose g6 and his bishop cannot defend white squares. Looking at the board, I first thought: where would I like my pieces to be? Also, this is a common endgame pattern. – silverSuns May 5 at 16:37

How to approach this problem. First you must understand just what the problem is, as you would with any problem. - It's obvious that white must promote a pawn to win. He'll never be able to move the g7 pawn, so the g6 pawn is the only candidate. To accomplish that he must sacrifice the g7 pawn while gettng his king over to defend the g6 pawn. But the question is whether he'll have enough tempi to do that. A quick count seems to indicate that he won't before black runs out of moves and is stalemated. Hence some "trickery" must be in order, i.e. the white king's interfering with the white bishop's protection of the g7 pawn long enough for the black king to capture it while the white king can then protect the g6 pawn. Now that we know the method, we can apply it, as follows - 1. Kb3 a4+ 2. Kc4 a3 3. Kd5 a1(Q) 4. Bxa1 a2 5. Ke5! Kxg7 6. Kf5+ Kg8 7. Kg5 Kf8 8. Kh6 Kg8 9. g7 Kf7 10. Kh7 Ke6
11. g8(Q)+ wins. (if 6..., Kh6 7. Kf6 Kh5 8. g7 Kh6 or Kg4 9. g8(Q) wins).