After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691053 - Issues with insufficient material detection
Issues with insufficient material detection
Status: RESOLVED FIXED
Product: gnome-chess
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-chess-maint
gnome-chess-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-03 06:01 UTC by Michael Catanzaro
Modified: 2013-04-15 04:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (3.57 KB, patch)
2013-01-03 06:03 UTC, Michael Catanzaro
committed Details | Review
Insufficient material fixes (3.62 KB, patch)
2013-04-15 04:26 UTC, Jason Clinton
committed Details | Review

Description Michael Catanzaro 2013-01-03 06:01:47 UTC
* King and two Knights vs. King is not insufficient material, but we say it is. (It's impossible to force an optimal opponent into checkmate from this position, but an inattentive player can lose.)  The draw should only occur once another Knight has been lost.

* King and minor piece vs. King and Knight is not insufficient material, but we say it is. This is definitely not a big deal - it's really hard to lose from this position - but it'd be technically correct to force this to play out.
Comment 1 Michael Catanzaro 2013-01-03 06:03:38 UTC
Created attachment 232611 [details] [review]
Fix

I'll do a patch for only the first situation if requested.
Comment 2 Michael Catanzaro 2013-01-03 06:05:03 UTC
I forgot to add, the testcases I added for this situation will fail until https://bugzilla.gnome.org/show_bug.cgi?id=691050 is applied.
Comment 3 Jason Clinton 2013-04-15 04:22:31 UTC
Comment on attachment 232611 [details] [review]
Fix

LGTM
Comment 4 Jason Clinton 2013-04-15 04:26:05 UTC
The following fix has been pushed:
3a0a4d6 Insufficient material fixes
Comment 5 Jason Clinton 2013-04-15 04:26:09 UTC
Created attachment 241542 [details] [review]
Insufficient material fixes

Although two knights cannot FORCE a checkmate, the opponent can
blunder. This position is not a draw.

Also, if each side has one minor piece (unless they are two
Bishops on the same color) the game is - surprisingly - not drawn.
With the extra piece you could wind up in a checkmate that's not
possible if the King is on his own.