Answers.Body: <p>(Human thought process below)</p>
  <p>White's h6-pawn gives him a decisive advantage. Note how it restricts Black's king. If the king is on g8 or h8, then Qg7 is checkmate, and so is Rd8 if Black's rook leaves the back rank. If the king is on f8, then Qg7+ still forces the king into the open, not to mention threatens Qxh7 followed by promotion. This immediately suggests the move 1. Qc5+. Black can't interpose with 1...Re7 because 2. Rd8 is checkmate, so the king is forced to g8. Then 2. Qe5 (exploiting the fact that the black rook can't leave the back rank) threatens 3. Qg7#, forcing 3...Kf8.</p>
  <p>At this point a 2-move tactic suggests itself: 4. Qh8+ Ke7 5. Re2+ wins the rook on e8. An extra rook is more than enough material to win, so Black's only recourse is a perpetual check. ...Qd1+-Qb3+ is a perpetual, so White must stop it, and conveniently 6. Qd4+ does this. White then collects the e8-rook and wins.</p>
  <p>Stockfish does suggest moves like 4...Qe6, but I don't think many humans would analyze that, because that is equivalent to resigns after 5. Rxe6+.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-27T04:55:53.517Z
Answers.LastActivityDate: 2022-03-27T04:55:53.517Z
Answers.UserDisplayName: Allure
Answers.Body: <p>In the position given, White, when plugged into Stockfish, has a +8 advantage. Seeing that white is to move, the first move should be Qc5+, followed by Kg8. Notice Re7 is not possible because of mate in 1 (Rd8#). Following Kg8 should be Qe5, and if Rxe5 it is mate in 2 with Rd8+, Re8, Rxe8#. Kf8 is the only move for black. Following this should be Qh8+, Ke7,Re2+, Kd6(any other king move results in mate in 8.), Qd4,and now black has to trade queens, or else it is mate in 10. Qd5, Qxd5+, Kxd5, can be possible, but Rxe8, Qxd4, cxd4 results in a better position, and from here Stockfish rates this +13.3. Kc2 or Rh8 for white results in a win.</p>
  <p>In a more interactive manner:</p>
  <pre><code>[fen &quot;4rk2/5p1p/2p3pP/8/p7/PqP1Q3/1P1R1P2/1K6 w - - 0 1&quot;]
  
  1. Qc5+ Kg8 (1... Re7 2. Rd8#) 2. Qe5 Kf8 (2... Rxe5 3. Rd8+ Re8 4. Rxe8#) 3. Qh8+ Ke7 4. Re2+ Kd6 5. Qd4+ {As Scounged in the comments, Qd4 is to stop perpetual check, as Qxe8 would be a blunder} Qd5 6. Rxe8 Qxd4 (6. Qxd5 Kxd5) 7. cxd4 Kd5
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-27T03:07:56.523Z
Answers.Text: Although your answer is fine, there are some flaws due to an over-reliance on Stockfish that I'd like to go over. The point of the answer is obfuscated by irrelevant SF details (like how Black "has to trade queens to avoid mate in 10", or how SF subtly favours a particular move sequence over another when the win is already assured). Moreover, you miss going over important details, such as why 5.Qd4 is warranted. 5.Qxe8?? would be a blunder since it would give Black a chance to give perpetual, so the point of 5.Qd4 is not to trade queens, but to avoid perpetual. This should be mentioned.
Answers.UserDisplayName: Scounged
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-27T07:30:52.807Z
Answers.Text: I have added that in :)
Answers.UserDisplayName: Stevo
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-27T13:30:23.723Z
Answers.Text: No you didn’t … oh wait, you did, in the PGN comments where no one will see it! If the rest of your analysis is in the main body of your answer, the comments about the perpetual check should be there too. I think that proper spacing, paragraphs, move numbers and identification of White/Black moves (by prefixing Black moves with ellipses) would all make this answer clearer as well.
Answers.UserDisplayName: Brian Drake
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-28T05:27:52.770Z
Answers.Text: I would make 6. Qxd5+ the main line.  Trade queens and take the rook, now you don't have to worry about perpetual check at all.
Answers.UserDisplayName: Ross Millikan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-27T01:16:38.520Z
Answers.LastActivityDate: 2022-03-27T07:29:05.390Z
Answers.LastEditDate: 2022-03-27T07:29:05.390Z
Answers.UserDisplayName: Stevo
Body: <p>In the board below, I'm not entirely sure who is winning, black's rook looks dangerous at the moment.</p>
  <p>Its white to move</p>
  <p>How does white have an advantage?</p>
  <pre><code>4rk2/5p1p/2p3pP/8/p7/PqP1Q3/1P1R1P2/1K6 w - - 12 39
  </code></pre>
  
Tags: <endgame><puzzles>
Title: How does white win/get an advantage here?
ThreadText: # How does white win/get an advantage here?
  
  (Asked by: username_0 on 2022-03-27)
  
  In the board below, I'm not entirely sure who is winning, black's rook looks dangerous at the moment.
  
  Its white to move
  
  How does white have an advantage?
  
  ```
  4rk2/5p1p/2p3pP/8/p7/PqP1Q3/1P1R1P2/1K6 w - - 12 39
  
  ```
  
  **Tags:** endgame, puzzles
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2022-03-27. Score: 5 | Accepted answer
  
  In the position given, White, when plugged into Stockfish, has a +8 advantage. Seeing that white is to move, the first move should be Qc5+, followed by Kg8. Notice Re7 is not possible because of mate in 1 (Rd8#). Following Kg8 should be Qe5, and if Rxe5 it is mate in 2 with Rd8+, Re8, Rxe8#. Kf8 is the only move for black. Following this should be Qh8+, Ke7,Re2+, Kd6(any other king move results in mate in 8.), Qd4,and now black has to trade queens, or else it is mate in 10. Qd5, Qxd5+, Kxd5, can be possible, but Rxe8, Qxd4, cxd4 results in a better position, and from here Stockfish rates this +13.3. Kc2 or Rh8 for white results in a win.
  
  In a more interactive manner:
  
  ```
  [fen "4rk2/5p1p/2p3pP/8/p7/PqP1Q3/1P1R1P2/1K6 w - - 0 1"]
  
  1. Qc5+ Kg8 (1... Re7 2. Rd8#) 2. Qe5 Kf8 (2... Rxe5 3. Rd8+ Re8 4. Rxe8#) 3. Qh8+ Ke7 4. Re2+ Kd6 5. Qd4+ {As username_3 in the comments, Qd4 is to stop perpetual check, as Qxe8 would be a blunder} Qd5 6. Rxe8 Qxd4 (6. Qxd5 Kxd5) 7. cxd4 Kd5
  
  ```
  
  > **Comments:**
  > **username_3**: Although your answer is fine, there are some flaws due to an over-reliance on Stockfish that I'd like to go over. The point of the answer is obfuscated by irrelevant SF details (like how Black "has to trade queens to avoid mate in 10", or how SF subtly favours a particular move sequence over another when the win is already assured). Moreover, you miss going over important details, such as why 5.Qd4 is warranted. 5.Qxe8?? would be a blunder since it would give Black a chance to give perpetual, so the point of 5.Qd4 is not to trade queens, but to avoid perpetual. This should be mentioned.  
  > **username_2**: I have added that in :)  
  > **username_4**: No you didn’t … oh wait, you did, in the PGN comments where no one will see it! If the rest of your analysis is in the main body of your answer, the comments about the perpetual check should be there too. I think that proper spacing, paragraphs, move numbers and identification of White/Black moves (by prefixing Black moves with ellipses) would all make this answer clearer as well.  
  > **username_5**: I would make 6. Qxd5+ the main line.  Trade queens and take the rook, now you don't have to worry about perpetual check at all.  
  
  ---
  
  ### Answer by username_1 on 2022-03-27. Score: 7
  
  (Human thought process below)
  
  White's h6-pawn gives him a decisive advantage. Note how it restricts Black's king. If the king is on g8 or h8, then Qg7 is checkmate, and so is Rd8 if Black's rook leaves the back rank. If the king is on f8, then Qg7+ still forces the king into the open, not to mention threatens Qxh7 followed by promotion. This immediately suggests the move 1. Qc5+. Black can't interpose with 1...Re7 because 2. Rd8 is checkmate, so the king is forced to g8. Then 2. Qe5 (exploiting the fact that the black rook can't leave the back rank) threatens 3. Qg7#, forcing 3...Kf8.
  
  At this point a 2-move tactic suggests itself: 4. Qh8+ Ke7 5. Re2+ wins the rook on e8. An extra rook is more than enough material to win, so Black's only recourse is a perpetual check. ...Qd1+-Qb3+ is a perpetual, so White must stop it, and conveniently 6. Qd4+ does this. White then collects the e8-rook and wins.
  
  Stockfish does suggest moves like 4...Qe6, but I don't think many humans would analyze that, because that is equivalent to resigns after 5. Rxe6+.
  
  
  ---
  
  