Issue 44 in gray-matter: illegal moves vs insufficient material

3 views
Skip to first unread message

codesite...@google.com

unread,
Jul 26, 2010, 2:31:09 PM7/26/10
to gray-matter-...@googlegroups.com
Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 44 by protonspring: illegal moves vs insufficient material
http://code.google.com/p/gray-matter/issues/detail?id=44

GM thinks it's OK to put itself into
check to take a piece forcing a draw
for insufficient material.

(GM thinks the game ends for insufficient
material before it realizes that the
next move kills the king)

codesite...@google.com

unread,
Jul 28, 2010, 11:56:17 AM7/28/10
to gray-matter-...@googlegroups.com

Comment #1 on issue 44 by protonspring: illegal moves vs insufficient
material
http://code.google.com/p/gray-matter/issues/detail?id=44

setboard 5K2/8/8/4qn2/8/8/8/4k3 b - - 0 1

In this example, gray should be able to find the
easy mate, but it can't. . I think because it
thinks Q to e7 results in a draw (before it
realizes that this is a win). To fix it we'd
have to analyze every position more thoroughly,
but I don't think this is a good idea either
(it is very very slow).


codesite...@google.com

unread,
Jul 28, 2010, 12:09:40 PM7/28/10
to gray-matter-...@googlegroups.com

Comment #2 on issue 44 by protonspring: illegal moves vs insufficient
material
http://code.google.com/p/gray-matter/issues/detail?id=44

fixed in revision 1603

codesite...@google.com

unread,
Jul 28, 2010, 12:13:50 PM7/28/10
to gray-matter-...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 44 by protonspring: illegal moves vs insufficient
material
http://code.google.com/p/gray-matter/issues/detail?id=44

In the board state method, instead of asking if the KINGs were attacking
each other, I just test if a king can be taken in any way. This should
result in the same, but also let us know if a move leaves us in check.

Because now this test happens BEFORE we test for insufficient material, GM
is a little smarter about it, and it doesn't take any more time.

I also added a few other speed optimizations I noticed.

codesite...@google.com

unread,
Jul 29, 2010, 1:17:27 AM7/29/10
to gray-matter-...@googlegroups.com
Updates:
Status: Accepted
Labels: -Priority-Medium Priority-High

Comment #4 on issue 44 by protonspring: illegal moves vs insufficient
material
http://code.google.com/p/gray-matter/issues/detail?id=44

Reopening. My previous fix caused GM to not be able to find many mates.

codesite...@google.com

unread,
Jul 29, 2010, 1:21:12 AM7/29/10
to gray-matter-...@googlegroups.com
Updates:
Owner: protonspring

Comment #5 on issue 44 by protonspring: illegal moves vs insufficient
material
http://code.google.com/p/gray-matter/issues/detail?id=44

(No comment was entered for this change.)

codesite...@google.com

unread,
Jul 30, 2010, 12:45:43 PM7/30/10
to gray-matter-...@googlegroups.com
Updates:
Status: Fixed

Comment #6 on issue 44 by protonspring: illegal moves vs insufficient
material
http://code.google.com/p/gray-matter/issues/detail?id=44

OK. Fixed.

Before we check for insufficient, we check if the onmove king is in check.
If so, the move we just made is illegal.

Reply all
Reply to author
Forward
0 new messages