PDA

View Full Version : Positions that lead to draws - how to detect?



brinch
02-02-2014, 08:08 AM
Hi

I have created a website where you can play chess endgames (http://chessendgames.com). I can currently detect draws if both players have insufficient material or in the case of threefold repetition. However, I would like to know when there is a dead draw on the board for any endgame position. Do you know how to generate such a list of drawn positions?

Thanks!

Cheers
Bo.

Rincewind
02-02-2014, 08:41 AM
I know of no such list other that short lists of examples in terms of insufficient mating material. For example

1) K v K
2) KN v K
3) KB v K
4) KB v KB is bishops are of the same colour

However dead draw perhaps you mean sufficient mating material but no way to lead to mate due to the position being blocked? I don't think even endgame table bases will help you here since they are only viable for a very small number of pieces.

brinch
03-02-2014, 06:45 AM
> However dead draw perhaps you mean sufficient mating material but no way to lead to mate due to the position being blocked?

Yes, that's what I mean :-) I suppose I will cover positions that only contain up to two pawns on each side - it will do for now.

Agent Smith
03-02-2014, 08:15 PM
You'll want to learn about tablebases. They are big databases about endgames, which can be stored locally, or retrieved online.

Jesper Norgaard
05-02-2014, 01:04 PM
> However dead draw perhaps you mean sufficient mating material but no way to lead to mate due to the position being blocked?

Yes, that's what I mean :-) I suppose I will cover positions that only contain up to two pawns on each side - it will do for now.

Here is an example of a dead draw with sufficient mating material:

4k3/8/8/8/1p1p1p1p/1P1P1P1P/8/5K2 w - - 0 1

If the white king would have been on e5, he wins easily. But since both the white king is blocked in by his own pawns, he can never win, and the black king is in the same situation.

I would say that if the white king (or the black king) can wander over the board and capture an enemy piece or a pawn, the position cannot be a dead draw. That means if you can construct a mini game like this

1.Ke2 Ke7 2.Ke3 Ke6 3.Kxf4 capturing the pawn makes it sure that white can win. Unfortunately 2.Ke3 is an illegal move, so in the end no sequence of legal moves can produce a checkmate for either color from the original position.

We can generalize the rule to if any piece or pawn can capture any enemy piece or pawn, the position cannot be a dead draw.

4k3/8/1p6/1P2p1p1/1P2P1P1/8/8/5K2 w - - 0 1

This is an exception to this rule. If we use the algorithm above for black, we can see that the black king can never pass the barrier of white pawns. However, the white king can, through c4 and d5, so if black makes random king moves, he can lose. However, since white can capture pawns, he can also break the barrier for black this way, in effect if white helps black, black can also checkmate. In short, it is not a dead draw at all.

In my opinion it is quite difficult to make a full database with all dead drawn positions, and also quite useless. You would have to check the position compared to all the dead drawn positions. You would have to confirm that all dead drawn positions are in fact part of the database, even with underpromotions etc. Instead using an algorithm with legal moves to have either king capture a piece or a pawn, that proves the position is not dead drawn. I suspect such an algorithm would not be hard to make, if the software already can check for illegal moves.

This is also a dead drawn position:

4k3/8/8/6b1/1p1p1p1p/1P1P1P1P/8/5K2 w - - 0 1

This is not:

4k3/8/8/6n1/1p1p1p1p/1P1P1P1P/8/5K2 w - - 0 1

This position is also not a dead draw:

4k2r/8/1p3p2/pPp1pPp1/P1PpP1Pp/3P3P/4K3/8 w k - 0 1

The rook cannot capture any pawn - but it can sacrifice itself. For instance 1.Kf3 Rh5 2.gxh5 and with this we have already proven the position is not a dead draw (a capture took place).

Finally a position where a pawn can be captured, but the position is still a dead draw:

4k3/8/8/p1p1p1p1/P1P1P1P1/pK6/P7/8 w - - 0 1

In fact according to the algorithm it is not a drawn position, because white can play 1.Kxa3. However, capturing that pawn does not make any difference, white cannot reach checkmate. The algorithm to check this would have to check if it is still possible to capture more pieces, after the first capture, or something along that idea.

brinch
06-02-2014, 08:50 AM
Hi Jesper

Very interesting and useful information with some good examples. I agree that this approach will probably be much more reliable than tablebase scans. I'll try to see if I can implement your algorithm in the nearest future.

Thanks a lot :-)

Jesper Norgaard
06-02-2014, 12:23 PM
Hi Jesper

Very interesting and useful information with some good examples. I agree that this approach will probably be much more reliable than tablebase scans. I'll try to see if I can implement your algorithm in the nearest future.

Thanks a lot :-)
You're welcome, brinch!

You will have to work a little bit more on the algorithm, I don't think my definition is watertight. At least the examples above should show a number of pitfalls.

I wonder if you have many examples of these dead draws in real games. In my experience, they are very seldom in OTB (over-the-board) play. I can only remember Magnus Carlsen's draw in a pawn endgame against Anand in Chennai (WC match), and that was even not a dead draw as such, because pawn pushes were possible (but suicidal).

ETA: However, dead draws by the four trivial examples from Rincewind, are of course very common.

Rincewind
06-02-2014, 01:01 PM
I think an algorithm that captures even a good number of the types of blocked positions described by Jesper would be quite a feat. Good luck with the task. Please, keep us informed if you get some good solution worked out.