Author: Tord Romstad
Date: 17:47:33 05/25/04
Go up one level in this thread
On May 25, 2004 at 20:45:08, Tord Romstad wrote: >Unfortunately I don't know to make sure my program is bug free. I have >plenty of bugs, even a couple of simple, obvious, eye-catching and very >serious-looking bugs which for some mysterious reason appear to make the >program much stronger (every time I try to make the one-line change needed >to fix the bugs the playing strength drops by about 100 Elo points). But >here are a couple of techniques I have found useful: > >1. Whenever you try out some new pruning technique (for instance when you > introduce hash table pruning), don't add the actual pruning to the engine > immidiately. Instead, set a flag which says "I would have pruned this > position if my new trick was enabled" (for instance, if the hash table > entry for the position contains a lower bound which is higher than beta, > and the depth of the entry is sufficiently big). If it later turns out > that the pruning decision was wrong (in the above example, if the search > doesn't fail high, despite the lower bound >= beta in the hash table), > you probably have a bug. Write the position to a log file. By inspecting > the log file, you should be able to spot the most serious bugs. This > technique is not only useful when adding non-speculative pruning, but > also when implementing various sorts of speculative forward pruning. It > can be used not only to find bugs, but also to detect holes and missing > special cases in forward pruning tricks. > >2. Write a function to compute a mirror image of the position on the board > (i.e. black and white sides interchanged). Find a big file of EPD > positions, and let your engine parse the file and evaluate each position > and its mirror image. This helps you find asymmetry bugs in the evaluation > function. This test should be done almost every time you do a change in > the eval. It is surprising how easy it is to introduce new asymmetry bugs. I forgot: 3. The most effective way to discover hash table bugs is to implement an MTD search. :-) Tord
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.