Your best bug ?

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Posts: 2262
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Your best bug ?

Post by mar » Fri Aug 10, 2012 4:45 pm

Evert wrote:Looking at this position I actually found a bug in Jazz' evaluation function for wrong bishop+edge pawn. It would recognise as a draw a position where the defending king could reach the promotion square, but not positions where it was actually on the promotion square. Easily fixed, of course, but the issue was entirely cosmetic anyway: it still preferred to stop the pawn over letting the pawn promote, but the score jumped between a large negative value and 0. It now correctly stays on 0.

Which is a round-about way of saying that I don't see how incorrect razor margins would cause you to get this wrong either, especially if the evaluation function recognises the draw and returns a draw score...
Yes it's a blind bishop as it can't cover the promotion square. I have this in eval, no problem. Kg2 draws. Even with my buggy razoring.

Posts: 21
Joined: Tue Sep 07, 2010 4:37 pm

Re: Your best bug ?

Post by yl84 » Sat Aug 11, 2012 3:00 pm

I have no razoring or futility pruning, but I'm doing static pruning with the full Eval near the leaves. Thus my programme has no problem with this position which is recognized as a draw. Maybe I'm lucky. I don't use TT. NullMove is disabled in this late ending.

Posts: 4074
Joined: Fri Mar 10, 2006 4:23 am

Re: Your best bug ?

Post by jdart » Sun Aug 12, 2012 12:56 am

I've had everything, but I can't really remember one single instance that was worth mentioning. It is truly amazing how broken the code can be and still play chess, even win sometimes. Sign errors are probably the most embarrassing.

Arasan has become less buggy over the years, partly because I started running more extensive test suites (and more recently, automated game matches) after any change. Anything before version 5.4 was very suspect because I didn't have as much testing infrastructure in place. I have become more humble about my programming skills as I get older. Even good guys make mistakes, and not making mistakes is a large part of generating good code.


User avatar
Posts: 859
Joined: Mon Aug 10, 2009 8:05 pm
Location: Italy
Full name: Stefano Gemma

Re: Your best bug ?

Post by stegemma » Sun Aug 12, 2012 7:50 am

My best bug was those in the last version of Freccia. The program played always the "half-best-move", loosing all the games. The problem was that the choosing of the best move were bugged in a way that the program scan the unsorted moves to find the best one (at ply 0) and when it founds the first best one, then it never choose the next best one. For sample, if those were the moves values:

-5 -2 4 10 3...

the program first select -5, then -2 as the best one, then it continues scanning but doesn't choose 4 or 10... so it play very bad. The situation were more complex and i needed a couple of years, to find the bug.

The interesting fact is that i've found the bug during a game in an italian championship. While my opponent was thinking, i was debugging... a sort of debug-pondering :)

Post Reply