Author: David Rasmussen
Date: 12:00:39 12/03/01
Go up one level in this thread
On December 03, 2001 at 14:50:57, Miguel A. Ballicora wrote: > >Nice observation, but the best thing to do IMHO is to use the more bits you can >in the "release" version and the least you can tolerate in the "debug" version. >At least, in a way you can switch it with a compiler directive. That is what >I did with the "transposition - refutation" table and I caught some bugs >that would happen rarely, but they will happen. They were in the legality >checking function. Even though those bugs would have been rare, they cause >crashes since accepting ilegal moves messes up everything. Avoiding >a crash every ~50 games (or whatever) it is worth it. >Debug versions should not use "Defensive programming!", they should increase >the chances of the unexpected so bugs will not be hidden and caught. > True, for a debugging version, but not for the release version. I have tons of debugging code in my program that I can turn on in the debugging version and off in the release version. It makes the program run slow, but it usually catches a lot of bugs. Whenever I find a bug that didn't easily get caught by the debug code, I think about what could achieve this, and add such debug code. It is very useful. A thorough debugging system built in to a chess engine is invaluable.
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.