Page 1 of 1

insufficient mating material

Posted: Mon May 29, 2017 1:42 pm
by zenpawn
In some recent gauntlets using cutechesscli, I noticed the following losses due to invalid draw claims. Some of these surprised me more than others, but I guess I'll have to correct them all regardless. This is mostly a heads up thread for others to check the insufficient mating material rules in their engines. Hope it helps.

[d]7n/8/8/4k3/2K5/8/8/6n1 w - - 0 69
Though forced mate is not possible, the lone king can still blunder into a self-mate in the corner.

[d]8/8/8/3b2k1/8/6K1/5B2/8 w - - 0 106
This fails the test because the bishops are of opposite color. If they were the same, the draw claim would be correct.

[d]8/8/7k/5K2/7b/5N2/8/8 w - - 0 150
Initially most surprising, but indeed, mates are possible in the corners opposite the bishop's color.

Re: insufficient mating material

Posted: Mon May 29, 2017 2:06 pm
by hgm
Indeed, these are not claimable under FIDE rules. Engines should also not try to 'outsmart the GUI' by claiming a draw because of a 'positionally dead' game, like

[d]4k3/8/8/p2p2p1/P2P2P1/8/8/4K3 w

GUIs cannot really play Chess (that is the engine's task), and although counting material is easily added, these kind of draws are beyond their comprehension of the game. So they would likely flag a draw claim as invalid.

Re: insufficient mating material

Posted: Mon May 29, 2017 2:09 pm
by zenpawn
Definitely wasn't intended as an outsmart, just a misinterpretation and/or faulty implementation of the rules. :)

Re: insufficient mating material

Posted: Mon May 29, 2017 7:25 pm
by zenpawn
So, the way I was handling this rule was to declare it a draw if both sides had insufficient mating material. However, the presence of enemy pieces that can box in their own king makes this an invalid assumption. Perhaps this is better suited to a lookup.

Re: insufficient mating material

Posted: Mon May 29, 2017 8:03 pm
by zenpawn
zenpawn wrote: [d]8/8/7k/5K2/7b/5N2/8/8 w - - 0 150
Initially most surprising, but indeed, mates are possible in the corners opposite the bishop's color.
And vice-versa, i.e., the knight can mate in corners opposite the bishop's color and the bishop can mate in corners of its own color.

Re: insufficient mating material

Posted: Mon May 29, 2017 9:02 pm
by jwes
zenpawn wrote:So, the way I was handling this rule was to declare it a draw if both sides had insufficient mating material. However, the presence of enemy pieces that can box in their own king makes this an invalid assumption. Perhaps this is better suited to a lookup.
A lookup doesn't help much either. You can offer a draw, but if that is not accepted, just move very fast and wait for the 50 move rule.

Re: insufficient mating material

Posted: Mon May 29, 2017 9:05 pm
by pedrox
When white and black have a knight, I think draw can not be claimed either, mate is possible.

Re: insufficient mating material

Posted: Mon May 29, 2017 9:06 pm
by zenpawn
jwes wrote:
zenpawn wrote:So, the way I was handling this rule was to declare it a draw if both sides had insufficient mating material. However, the presence of enemy pieces that can box in their own king makes this an invalid assumption. Perhaps this is better suited to a lookup.
A lookup doesn't help much either. You can offer a draw, but if that is not accepted, just move very fast and wait for the 50 move rule.
I think I've solved it without a lookup. Probably offering a draw for the ones that aren't legally insufficient material is a nice thing to do, but alas, I haven't added that.

Re: insufficient mating material

Posted: Mon May 29, 2017 9:08 pm
by zenpawn
pedrox wrote:When white and black have a knight, I think draw can not be claimed either, mate is possible.
Indeed.

[d]6nk/5N2/6K1/8/8/8/8/8 b - - 0 0

Re: insufficient mating material

Posted: Tue May 30, 2017 9:52 am
by Lyudmil Tsvetkov
knight against rook is also sometimes not drawn:

[d]6rk/5N2/7K/8/8/8/8/8 b - - 0 1