chess online
« TAP TO LOG IN
GameKnot related: Is this a bug?
« Back to forum
FromMessage
porcho
31-Jul-13, 06:54

Is this a bug?
I have a game in progress with just a king and a knight on both sides and gameknot doesn't say it's a dead position. I offered a draw but had it declined so now I have to play out the fifty move rule. One king and knight can't get checkmate, so I think this is a dead position.
ketchuplover
31-Jul-13, 18:24

actually...
there is a mate position but the loser has to commit hari-kari basically
porcho
31-Jul-13, 18:29

Arggg
Well that's very annoying, I guess it isn't a bug but it sure is not very much fun to keep playing it.
porcho
01-Aug-13, 07:27

Well
I managed to trick him into taking my knight, so now the computer rules it a dead position.
tobiasverhulst
02-Aug-13, 06:22

There is a difference between 'positions where no mate is possible' and 'positions where no forced mate is possible'. KN vs KN falls into the second category because, as ketchuplover said, if one of the players plays very foolish, a mate is theoretically still possible.

However, only the first category, positions where no mate can ever occur no matter how bad one plays, are so called 'dead positions'. This include K v K, KL v K, KN v K, KB v KB (if the bishops are of the same color) and some rare cases where blocked pawns prevent any possible progress.

As an arbiter in OTB tournaments I have noticed that many people are somewhat confused by the difference between those two situations. As porcho said, sacrificing your own piece can help in reaching a dead position.
porcho
02-Aug-13, 06:25

Okay
Thanks for the clarification, it can be quite annoying when you just want a draw because there's no way to get mate unless someone purposely plays into it and your opponent doesn't accept your draw offer.
tobiasverhulst
02-Aug-13, 06:25

Actually, come to think of it, I wonder whether all possible cases of dead positions resulting from blockades would be detected.
porcho
02-Aug-13, 06:26

I doubt it, I don't think that gameknot would go to so much trouble to program that into the rules.
jotheblackqueen
04-Aug-13, 10:28

It happened to me!
Hi Porcho,

You are not the only person for this to happen to. Check out what happened to me with the white pieces against a near-Expert.

gameknot.com

We were both left with our kings and one minor piece each. I had to manually offer a draw and thankfully my opponent accepted.

Coach Ion ended up explaining the same thing as ketchuplover above.

Kind regards

Joanne
sirissac
07-Aug-13, 01:06

@tobiasverhulst: In theory, blockaded positions could be very complex. My initial expectation was that they could have no knights, or rooks, but I soon realized that was wrong:



Maybe they can even have queens but I don't see it yet. Anyway, if there were simple constraints on a blockaded position you might compute it efficiently but it seems like these positions would require checking actual moves.
tobiasverhulst
07-Aug-13, 01:16

I'm pretty sure it is possible to produce a blocked position with queens too. It is indeed difficult to check constantly whether a position like this is dead.

Maybe an option for this should be added to the 'declare draw' button, so players can check it for themselves en have the computer evaluate it only when the player ask for it. Although, draws by repetition or fifty move rule are fundamentally different from dead positions, I think this would be the most practical solution.

Of course, positions like these are rare. On the other hand, there are, at the moment of this posting 23,806,611 games finished. So, there might have been some examples already.
sirissac
07-Aug-13, 02:31

"On the other hand, there are, at the moment of this posting 23,806,611 games finished. So, there might have been some examples already. "
First, it's always a pleasure to meet someone who understands the law of large numbers; and I think adding the feature to the declare draw button would be most likely. In fact, I find it odd that "insufficient material" isn't on there to begin with.

Second, my last post may have been misleading. I did not mean that checking the position (automatically) for each move was inefficient. I meant checking any position at all in this way (by considering all subsequent moves) was inefficient. There might be some cases where 3-fold repetition shortens things, but most of the time one would need to check (every alternative) 50 moves deep, which is really 100 half-moves deep. If no moves are forced then that's over 2^100 = 1267650600228229401496703205376 positions. So more heuristic conditions need to be stipulated and checked. You can probably come up with several conditions very easily, but the hard part is knowing that one has listed/implemented all conditions.
tobiasverhulst
07-Aug-13, 08:35

Deleted by tobiasverhulst on 07-Aug-13, 08:35.
tobiasverhulst
07-Aug-13, 08:37

sirissac, There are more efficient ways to check whether a position is blocked, without looking at all possible moves (which, as you point out, is impossible to do). It is not that difficult to check whether a capture can still be made in any number of moves. For example, in your first example position, it is immediately clear that no bishop will be able to make the next capture, and neither will the knight.

The only thing that still has to be checked is whether one of the kings has a path to a possibly undefended pawn (meaning, a pawn that can be undefended without first taking another pawn; or: a pawn available for the next capture). The number of calculations needed to look through all such possible paths is much more manageable.

This kind of more sophisticated algorithms, no relying on brute force, are now routinely employed in the better chess engines. Otherwise, they would be as good in the endgame as during the middlegame, since many endgames are impossible to play through brute force.
sirissac
07-Aug-13, 10:57

Of course there are quicker ways to check some positions, I'm just not sure there are any efficient ways to identify every dead position and only dead positions. Here is a position where no pawn captures are ever possible, but the position isn't dead:


1. Bg8 Bc7 2. Be6 Bb8 3. Bc8 Kg8 4. Bb7 Kf8 5. Bc8 Ke8 6. Bb7 Kd8
7. Bc6 Kc8 8. Be8 Bc7 9. Bc6 Kb8 10. Bd7 Ka8 11. Bc8 Bb8 12. Bb7#

Of course if either bishop is removed it is a dead position.

As for chess engines I was pretty sure they used databases of predetermined cases for endgames. But I'm not sure if that is the case in all of them or not. Still, I doubt those that do would play perfectly in every case since Chess is full of subtleties.

So with the blockade issue, it should be easy to produce conditions which identify some or even the most probable dead positions; especially if your willing to make rare mistakes and include positions that are not really dead. But describing generic conditions which eliminate any infinitesimal margin of error seems too great a challenge.
tobiasverhulst
07-Aug-13, 11:06

That's a very problematic position you found there! I have not immediately an idea how cases like this could be filtered by an algorithm.

Concerning chess engines: most of them do indeed have a database, but these our most useful when there are very few pieces left. However, even in positions where there is still a lot material there can be cases where heuristics are needed instead of straightforward, brute force calculations. And of course, when one starts using alternative methods there are other kinds of errors that will sometimes be made. The advantage of brute force is that, up to the depth reached by the calculations, it does in fact see everything.