A bug in Crafty 20.14

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

A bug in Crafty 20.14

Post by ilari »

Already posted about this at http://wbforum.vpittlik.org/viewtopic.php?t=6873

In short, the problem is that Crafty can't force a mate in this easily won endgame without tablebases: 5R1N/K7/8/3k4/8/8/8/8 w - - 0 131
If I give it enough time it _may_ win by sacrificing the knight to avoid a draw by 50 moves.

I've confirmed this with both the 64-bit Ubuntu build (from the multiverse repository) and the win32 build from Robert Hyatt's ftp site.
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: A bug in Crafty 20.14

Post by jwes »

ilari wrote:Already posted about this at http://wbforum.vpittlik.org/viewtopic.php?t=6873

In short, the problem is that Crafty can't force a mate in this easily won endgame without tablebases: 5R1N/K7/8/3k4/8/8/8/8 w - - 0 131
If I give it enough time it _may_ win by sacrificing the knight to avoid a draw by 50 moves.

I've confirmed this with both the 64-bit Ubuntu build (from the multiverse repository) and the win32 build from Robert Hyatt's ftp site.
On my computer with 768m hash it takes about 3 minutes to find the mate, but it seems singularly clueless until it sees the mate (it keeps wanting to move the knight back to h8).
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: A bug in Crafty 20.14

Post by bob »

jwes wrote:
ilari wrote:Already posted about this at http://wbforum.vpittlik.org/viewtopic.php?t=6873

In short, the problem is that Crafty can't force a mate in this easily won endgame without tablebases: 5R1N/K7/8/3k4/8/8/8/8 w - - 0 131
If I give it enough time it _may_ win by sacrificing the knight to avoid a draw by 50 moves.

I've confirmed this with both the 64-bit Ubuntu build (from the multiverse repository) and the win32 build from Robert Hyatt's ftp site.
On my computer with 768m hash it takes about 3 minutes to find the mate, but it seems singularly clueless until it sees the mate (it keeps wanting to move the knight back to h8).
There is a gross bug in EvaluateMate() which is in evaluate.c... If you want to fix it, look at the top of EvaluateMate() which has this:

int mate_score = DrawScore(1);

change it to this:

int mate_score = 0;

Not sure what is wrong there and how it happened, but a change was made somewhere along the way and the basic idea is that in a KBN vs K ending crafty plays it just like it should. For any other ending without pawns, it has no idea about driving the king to the edge of the score, which is a killer. The above change fixes it...

I tried KQ vs KR, which is a trivial ending for a computer (without tablebases) and it had no idea at all. Which led me to the bug...
User avatar
Jim Ablett
Posts: 2390
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: A bug in Crafty 20.14

Post by Jim Ablett »

Crafty 20.14 Intel compiler 10 PGO windows build with bugfix:

http://myfreefilehosting.com/f/14ef30b726_0.33MB

Jim.
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: A bug in Crafty 20.14

Post by BBauer »

I can access your site,
but how can I download a file? :o
regards
Bernhard
Alexander Schmidt
Posts: 1235
Joined: Thu May 10, 2007 2:49 pm

Re: A bug in Crafty 20.14

Post by Alexander Schmidt »

BBauer wrote:I can access your site,
but how can I download a file? :o
regards
Bernhard
Click on: "Click Here To Download" :D

Alex
User avatar
Jim Ablett
Posts: 2390
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: A bug in Crafty 20.14

Post by Jim Ablett »

Hi Bernhard,
I can access your site,
but how can I download a file? Surprised
There is some problems with the download servers/providers I've
been using for my homepage download links, that's why I'm using
an alternative for the Crafty link.

Hopefully fixed soon:)

Jim.
User avatar
beachknight
Posts: 3533
Joined: Tue Jan 09, 2007 8:33 pm
Location: Antalya, Turkey

Re: A bug in Crafty 20.14

Post by beachknight »

Hello Jim,

Could you compile for mt=2 for me?

TIA,
hi, merhaba, hallo HT
User avatar
Jim Ablett
Posts: 2390
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: A bug in Crafty 20.14

Post by Jim Ablett »

Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: A bug in Crafty 20.14

Post by Dirt »

Jim Ablett wrote:Crafty 20.14 Intel compiler 10 PGO windows build with bugfix:

http://myfreefilehosting.com/f/14ef30b726_0.33MB

Jim.
The 'Click Here To Download' link there just times out for me.