Opposite colored bishops endgame: Is this a draw? [FEN ""]
[Event "Rated Correspondence game"]
[Site "https://lichess.org/GILERcIS"]
[Date "2020.02.26"]
[Round "-"]
[White "mathwhiz16"]
[Black "theMortician"]
[Result "1/2-1/2"]
[UTCDate "2020.02.26"]
[UTCTime "23:31:55"]
[WhiteElo "1795"]
[BlackElo "2017"]
[WhiteRatingDiff "+3"]
[BlackRatingDiff "-6"]
[Variant "Standard"]
[TimeControl "-"]
[ECO "D02"]
[Opening "Queen's Pawn Game: London System"]
[Termination "Normal"]
[Annotator "lichess.org"]

1. d4 Nf6 2. Bf4 d5 3. Nf3 { D02 Queen's Pawn Game: London System } Bf5 4. e3 e6 5. Nbd2 Bd6 6. Bg3 Nbd7 7. Nh4 Ne4?! { (-0.44 → 0.11) Inaccuracy. Bg4 was best. } (7... Bg4 8. f3) 8. Nxf5 exf5 9. Bd3 Ndf6 10. O-O O-O 11. Nf3 Nxg3 12. hxg3 Ne4?! { (-0.37 → 0.42) Inaccuracy. g6 was best. } (12... g6 13. Rc1 c6 14. c4 dxc4 15. Bxc4 Kg7 16. Bd3 Qd7 17. a3 h6 18. Qa4 Rfe8 19. Qc2) 13. c4 dxc4 14. Bxc4 Kh8?! { (-0.14 → 0.47) Inaccuracy. Qe7 was best. } (14... Qe7 15. Re1 c6 16. Bd3 Rfe8 17. Rc1 Rad8 18. Qb3 g6 19. Re2 Bb8 20. Qd1 Rc8 21. Qb3) 15. Qb3 Qe7 16. Qxb7 Rab8 17. Qxa7 Rxb2? { (0.77 → 1.95) Mistake. Nxg3 was best. } (17... Nxg3) 18. Qa5?! { (1.95 → 0.99) Inaccuracy. Rab1 was best. } (18. Rab1 Rc2 19. Qa4 Rc3 20. Rb3 Rxb3 21. Qxb3 c5 22. dxc5 Nxc5 23. Qc2 Qe4 24. Qxe4 fxe4) 18... Bb4? { (0.99 → 2.68) Mistake. g6 was best. } (18... g6) 19. Qxf5 Nd2 20. Nxd2 Bxd2 21. Rab1 Qb4?! { (2.84 → 4.30) Inaccuracy. Rb6 was best. } (21... Rb6 22. Rxb6 cxb6 23. Bd5 Qc7 24. Be4 g6 25. Qf6+ Kg8 26. Rb1 Ba5 27. Bc6 Rd8 28. d5) 22. Rxb2 Qxb2 23. Rb1 Qa3 24. Qe5 Ba5 25. Rb3 Qxa2? { (3.89 → 8.20) Mistake. Qc1+ was best. } (25... Qc1+ 26. Kh2) 26. Bxf7?? { (8.20 → 2.23) Blunder. Qe7 was best. } (26. Qe7 Rc8 27. Qd7 Rf8 28. Qxf7 Rd8 29. Kh2 Qc2 30. Rb5 Qg6 31. Qxg6 hxg6 32. Rxa5 Rf8) 26... Bb6?! { (2.23 → 3.23) Inaccuracy. Be1 was best. } (26... Be1 27. f3) 27. Qe7 Qa8 28. Rb5 Qd8 29. Qxd8 Rxd8 30. Re5 g6 31. Re8+?! { (2.67 → 1.77) Inaccuracy. Bc4 was best. } (31. Bc4) 31... Rxe8 32. Bxe8 Kg7 33. Bc6 Kf6 34. Kf1 h5 35. Ke2 g5 36. Kf3 Ba5 37. Be4 Be1 38. Ke2 Bb4 39. f3 Bd6 40. g4 hxg4 41. fxg4 Bg3 42. Kf3 Bd6 43. Bf5 Ba3 44. e4 Bb2 45. e5+ Ke7 46. Ke4 Bc1 47. Bc8 Bd2 48. Kf5 Be3 49. d5 Bd2 50. Bb7 Be3 51. Bc6 Bd2 52. Ke4 Bc3 53. Bb5 Bb2 54. Kf5 Bc1 55. Ba6 Bd2 56. Bc8 Bc1 57. Be6 Bd2 58. Ke4 Bc3 59. Bg8 Bb2 60. Bh7 Bc3 61. Bg6 Bb2 { The game is a draw. } 1/2-1/2


The annotations/variations are from Stockfish on lichess. I am White(mathwhiz16). After playing a confusing middlegame where I missed several tactical shots, I played 31. Re8+ because I was sure being up two pawns and having a passed pawn was enough to ensure victory, regardless of bishops of opposite colors. Needless to say, I botched the ending. 


Is the position after 31. Re8+ a draw?
If not, where did I mess up? I think my final mistake was 49. d5, ensuring my king was tied to my pawn, but was it winning before that? After that? What is the correct strategy to win?
Is the final position a draw or did I miss something obvious?


Note that Stockfish(depth=21) gives White at a permanent +1 advantage so it's possible I missed something.
I disagree that it is a draw. In practice, it might not be a good practical decision to trade the rooks there if you are not sure it is a win, but it was almost certainly a win.

Despite the opposite-colored bishops, you are up two pawns, but more importantly, and the reason it is still a win, is that the black pawn is on the h-file, and the unbalanced pawns make this untenable for black. If it had been on the f-file, I would agree that it was a draw. It also helps that you can play the K to d3, then f4, e4, and e5.

In opposite-colored bishop endings, the stronger side wants to keep the pawns on the opposite color of the bishop to control both colors, making it easier to bring the king up and help the passed pawns advance; while the weaker side, black here, wants to keep the pawns on the same color of his bishop trying to use the dark squares to blockade. That is just not possible for black to accomplish here.

This is not every possible line, but I used a lot of endgame experience on the master level to try plans that would make some sense, and after the first few moves bringing the kings up, all the Stockfish evals are at least +5, and shortly after, they go to +9, which indicates a guaranteed win. I stopped all the analysis below when it got to +9 or greater.

 [FEN "3r3k/2p2B1p/1b4p1/4R3/3P4/4P1P1/5PP1/6K1 w - - 0 1"]

 1. Re8+ Rxe8 2. Bxe8 Kg7 3. Kf1 Kf6 (3... g5 {Trying the plan to put the pawns on the dark squares.} 4. f4 h6 5. Ke2 Kf6 6. Bc6 gxf4 (6... Ke6 $2 {The evals here are already +9.} 7. Kd3 Kd6 8. Ba4 Ba5 9. e4 Be1 10. f5 $18) 7. gxf4 Kf5 8. d5 Ba5 9. Kf3 $18) 4. Ke2 Ke7 (4... c5 5. d5 Ke5 (5... c4 6. f4 Kf5 7. Kf3 c3 8. e4+ Kf6 9. e5+ Ke7 10. Ba4 $18) 6. Bc6 g5 7. f4+ Kf5 8. d6 gxf4 9. gxf4 c4 10. Bd5 c3 11. Kf3 Kf6 12. Bb3 Bc5 13. e4 $18) 5. Ba4 Kd6 (5... g5 6. f4 h6 7. Kd3 Ba5 8. e4 Be1 9. f5 Bxg3 10. e5 $18) 6. Bb3 {To prepare d5 should black play c5 trying to trade the pawn off. This only works because white has a pawn on f4.} h6 7. f4 Ba5 8. e4 $18


Supplemental analysis of the game based on Quintec's request below.

 [FEN "3r3k/2p2B1p/1b4p1/4R3/3P4/4P1P1/5PP1/6K1 w - - 0 1"]

 1. Re8+ Rxe8 2. Bxe8 Kg7 3. Bc6 {There is no harm here, but you should really get in the habit of centralizing your king early in the endgame.} Kf6 4. Kf1 h5 $4 {In opposite-colored-bishop endings, these belong on the other color trying to setup a blockade. Here g6+h5 are just targets.} 5. Ke2 {Not bad, but f4 again with the possible line.} (5. f4 g5 6. Ke2 Ba5 {Or any move really.} (6... g4 $4 7. Be8 $18) (6... Ke7 7. Kd3 Ba5 8. e4 Be1 9. e5 Bxg3 10. f5 $18) 7. Be8 h4 8. gxh4 gxh4 (8... gxf4 9. exf4 $18) 9. e4 $18) 5... g5 6. Kf3 {Still f4.} Ba5 7. Be4 {There is nothing wrong with this in terms of spoiling the position, but it is clear that you are already headed down the wrong path.} Be1 8. Ke2 Bb4 9. f3 $2 {The wrong idea.} Bd6 $2 (9... c5 {The best try, and already close to drawing, but not quite. Even in the closest line, black will need to play perfectly, and know endgame theory.} 10. d5 (10. dxc5 $2 Bxc5 11. f4 Be7 {The only move per the computer, and the hidden point is that the Be7 will need to be able to take on h4 soon.} 12. Bc6 Ke6 13. Kf3 h4 14. gxh4 gxf4 15. exf4 Bxh4 16. g4 {With a tablebase draw.}) 10... Ke5 11. Bg6 {And there, that bad move h5 comes into play.} h4 (11... Kxd5 12. Bf7+ Ke5 13. Bxh5 c4 14. Bg6 Bc5 15. f4+ $18) 12. gxh4 gxh4 13. f4+ $1 Kxd5 14. Bf7+ {And the two passers decide.} Ke4 (14... Kd6 15. Bc4 $18) 15. Bc4 Ba3 16. Bb5 Bc1 17. Bc6+ Kf5 18. Bd5 Kg4 19. Kf2 Kf5 (19... h3 20. Be6+) 20. Kf3 Kf6 21. e4 $18 {You can already see how much more difficult this ending became.}) 10. g4 $4 {This gives away the win. Note that had they been same-colored bishops and both had dark-squared bishops, both sides WOULD want them on light squares.} hxg4 11. fxg4 Bg3 $2 (11... c5 {Immediately draws.} 12. d5 Ke5 {And the blockade is complete.}) 12. Kf3 Bd6 13. Bf5 Ba3 $2 (13... c5 14. Ke4 cxd4 15. exd4 Ke7 {Again with a blockade and draw.}) 14. e4 Bb2 (14... c5 {Now, it is too late.} 15. e5+ Ke7 16. d5 $18) 15. e5+ Ke7 16. Ke4 {It is still a draw here, but white has made progress compared to the easy draws earlier. Now, c5 is ruled out for the foreseeable future.} Bc1 17. Bc8 Bd2 18. Kf5 Be3 19. d5 Bd2 20. Bb7 Be3 21. Bc6 Bd2 22. Ke4 Bc3 23. Bb5 Bb2 24. Kf5 Bc1 25. Ba6 Bd2 26. Bc8 Bc1 27. Be6 Bd2 28. Ke4 Bc3 29. Bg8 Bb2 30. Bh7 Bc3 31. Bg6 Bb2 1/2-1/2