It is not checkmate because Black can interpose a piece to block the check from the bishop: move knight or queen to e6.
It's still only a miniscule delay for the inevitable.
[FEN "1rk4r/1p6/3p3q/Q1pPbRnP/p1P3B1/P6P/1P4R1/7K w - - 0 1"]
Imagine a variation of chess without the rules about check and checkmate, where a player wins simply when he captures his opponent's king. In this variation, Kxd5 loses the game to exd5.
Turns out, that's more or less how real chess works. The objective is to capture the opponent's king. If your king is under attack, you must deal with that threat. If there'...
The best move would have been 16. Rxe5, which entirely eliminates the mate threat, leaving white with a winning advantage.
r6r/ppNk1p1p/3p2p1/2p1R3/2P3bq/3Q4/PP3PPP/R1B3K1 b - - 0 16
Here, if black takes the white knight (16. ... Kxc7), 17. Bg5 wins the queen as Qh5 is met with Bd8+.
Those are just the rules of the game. You could absolutely try to make the case that moving into check in such a situation should be legal, but playing by those rules wouldn't be chess anymore (it would be some variant).
You could also ask why stalemate is a draw and not a win, even though the latter result would make more sense in a real battle. These are ...
I will answer from a different perspective: why Racing Kings (RK) has a rule to allow black a chance to draw, and why the same logic doesn't apply to chess.
What is Racing Kings (RK)?
Background for those unfamiliar with RK: Both sides start with all pieces (no pawns), arranged on the first 2 ranks of the chessboard, white on the right, black on the left. ...
[FEN "R5k1/5ppp/8/2r5/1b6/8/5PPP/6K1 b - - 0 1"]
1... Rc8 2. Rxc8+ Bf8
This is an example of what Tim Krabbé calls an 'unguarded guard' - a linepiece checks, and a piece interposes on an unguarded square. That page mentions Topalov - Polgar, Novgorod 1996 (see below); while not a true back rank mate, it comes close. Here are some endgame studies with other ...
Take your pick.
Conventionally in computer chess, we express your idea of phases as "plies", or half-moves, where 2 plies is one "turn".
You can detect checkmate in the ply where the checkmating move is made, but it is more common for checkmate to be detected in the following ply, where your program generates legal moves for the mated player, only to find ...
I just remembered a class of chess problem; see item 267 of Tim Krabbé's Open Chess Diary (his whole site is highly recommended):
[Title "White mates in 7, Noam Elkies, 2004."]
[FEN "KBk5/P1P4p/2Pp3P/P6p/2p3rP/2P3pB/6P1/8 w KQkq - 0 1"]
Spoiler: White has some choices here, he can choose different move orders. But it's always checkmate on move 7, no matter ...
Here's what I came up with.
Bishop took me 3 moves:
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
1.e4 f5 2.Be2 g5 3.Bh5# *
Knight took me 3 moves as Black:
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
1.e4 Nc6 2.Ne2 Nd4 3.g3 Nf3# *
Pawn took me 5 moves:
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - ...
Here's a simple Python program that answers the question but is slow, taking 40 minutes to run to 5 plies on my laptop (and increasing at least 30-fold per additional ply). A nice thing is that it prints out the games, if you need that. I could post the output here but didn't want to make a 347-line long answer... :-)
from chess import pgn
There is no valid human reason. The difference between Kc4 (mate in 12), and Kc2 (mate in 10) is fairly irrelevant. It simply appended the "?!" based on the algorithm that 10 is slightly worse than 12. Either way, it is, indeed, a simple win from there.
By the way, my plan would be Rd7, then bring the king to h1/g1, and only then, bring the rook over via ...
I don't think it is possible to forcibly mate the king with rook and knight only.
Proof: The only mating position is with the white king in a corner, the rook giving check from an adjacent square and the knight protecting the rook and covering the escape square.
For simplicity let's say Ka1, Rb1, Nc3. There are 7 other equivalent positions to this one.
The top person that I know for this kind of analysis is François Labelle, who has computed many numbers associated with chess (including an estimate of the maximum growth rate of the number of chess games as a function of ply) and in particular has computed the number of checkmates up to ply 13. For values up to ply 12, see the figure in http://wismuth.com/...
It is very relevant since in chess, often when you have two mate threats on two separate squares, you cannot defend both.
In this case, if you defend the mate on h7, for example, with f5; then Qf8 is still mate. If you defend the QxRf8 mate by Rg8, then Qh7 is mate. That is pretty relevant.
The current record for most forced checkmates in a legal position with no promoted pieces is 29:
[Title "Harold Holgate Cross, The Problemist FCS Apr 1936, 2251"]
[fen "8/1b6/p1N5/P1r5/P3KPr1/QBk1NRP1/P2R1P2/4B3 w KQkq - 0 1"]
PDB has it at id P1178654. White is to move.
(For the record where the position must be legal and may have ...
Here’s a really easy mate in 21 that I found the other day on Matplus. Give it a try! The solution is much simpler then the other answer.
White To Move And Mate Black In 21 Moves
[Title "Filip Bondarenko, Feenschach 1960"]
[FEN "8/7Q/2r1p3/2rkr3/2rrr2Q/7K/8/8 w - - 0 1"]
EDIT: @Fate the creator of this answer's question, created an interesting mate in 23 ...
To get the following position as a checkmate, the last move must be Nb3#.
[fen "8/8/8/8/8/1NN5/2K5/k7 b - - 0 2"]
Prior to Nb3#, black must have made a non-king move, so must have moved something to b3. If it were anything other than a pawn, it could choose to avoid the b3 square, so it's not a forced win for white. If it were a pawn on b4, it could ...
First ask yourself why the differentiation of a 'back-rank mate' is meaningful.
Generalized patterns that we call 'tactics' have names because it helps us to learn from them and respond to them. For example, I personally find the distinction between 'pin' and 'skewer' meaningful because it helps to separate the concepts of attacking 'through' either a less ...
For the purposes of writing an algorithm, I don't think I would approach it that way at all.
On any given ply, you generate a list of legal moves to investigate. A move is illegal if, in the resulting position, your king is in check. If there are no legal moves, and the king is currently in check, then it's checkmate.
You don't need an algorithm to ...
According to Wikipedia,
A pure mate is a checkmating position in chess in which the mated king
and all vacant squares in its field are attacked only once, and
squares in the king's field occupied by friendly units are not also
attacked by the mating side (unless such a unit is necessarily pinned
to the king to avoid it interposing to block the ...
I doubt that anyone will be able to give you a definitive answer beyond this one, but the longest known win from the end of a game is a famous 549-move 7-piece tablebase win. Until we get to 8-piece tablebases, this is probably the longest anyone can prove.
You can see that position, and all 549 moves here.
you play a combination that is technically stronger since it forces mate, but it takes 8 moves, some of which are hard to see
If they're hard to see, chances are that you've missed something as well. Therefore, take the queen. You might miss the opportunity to finish the game in a beautiful way, but you can always save that for the post-mortem analysis.
Here's a #4 where White has just KNN and there are no Black units blocking Black king flights:
[Title "C. Barton; Family Herald 5 Nov 1859, no. 65"]
[fen "8/8/8/8/8/6K1/4p1N1/4N1k1 w - - 0 1"]
1.Ne3 Kh1 2.Ng4 Kg1 3.Nf3+ Kh1 (3... Kf1 4.Ne3#/Nh2#) 4.Nf2#
Here's a #5 where White has just KNN and the play is a bit more interesting than in ...