Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: What is your oldest bug?

Author: Ross Boyd

Date: 04:45:30 05/30/05

Go up one level in this thread


Hi James,

I hate bugs. :-)

One bug that troubled TRACE for over 6 months should have been easy to find. But
I was looking in the wrong place.

My makemove routine returns true if the move is legal, ie. the king isn't left
in check.  No problem there. But.... I kept count of legal nodes in makemove
also....
so the last line in my makemove was:

return ++nodes;

This works fine until the 32 bit nodes counter rolled over.... and then it
disastrously returned FALSE... CRUNCH!

It never bothered TRACE in actual games because it needed a very long analysis
to trigger the bug... which led me to suspect it was caused by an array bounds
error.

It sure felt good to finally fix it.

Similar to you, my eval had an asymmetric bug in the trapped rook code. If the
rook was trapped in the H1 corner it was never penalised. I used the trusty
mirrored fen technique to detect it.

I'm sure there are more bugs lurking. Its easy to fool oneself that if it isn't
crashing it must be bug free....   yeah, right!

Ross









This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.